lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <800915fc-c865-2c1e-43a5-514325198469@gmail.com>
Date:   Sun, 5 Jun 2022 17:02:59 +0800
From:   Miaoqian Lin <linmq006@...il.com>
To:     Sam Ravnborg <sam@...nborg.org>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Daniel Hellstrom <daniel@...sler.com>,
        sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sparc32,leon: Fix reference leak in leon_ipi_init


On 2022/6/5 15:48, Sam Ravnborg wrote:
> On Sun, Jun 05, 2022 at 09:29:41AM +0400, Miaoqian Lin wrote:
>> of_find_node_by_path() returns a node pointer with
>> refcount incremented, we should use of_node_put() on it when done.
>> Add missing of_node_put() to avoid refcount leak.
>>
>> Fixes: 1ca0c808c60f ("sparc32,leon: Implemented SMP IPIs for LEON CPU")
>> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
> The patch is finei, thanks:
> Acked-by: Sam Ravnborg <sam@...nborg.org>
>
> All other uses of of_find_node_by_path() in sparc has the same issue.
> Could you try to take a look at the rest too?

Sure, I will look into them.

> 	Sam
>> ---
>>  arch/sparc/kernel/leon_smp.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c
>> index 1eed26d423fb..85b22669c002 100644
>> --- a/arch/sparc/kernel/leon_smp.c
>> +++ b/arch/sparc/kernel/leon_smp.c
>> @@ -284,6 +284,7 @@ static void __init leon_ipi_init(void)
>>  		pp = of_find_property(rootnp, "ipi_num", &len);
>>  		if (pp && (*(int *)pp->value))
>>  			leon_ipi_irq = *(int *)pp->value;
>> +		of_node_put(rootnp);
>>  	}
>>  	printk(KERN_INFO "leon: SMP IPIs at IRQ %d\n", leon_ipi_irq);
>>  
>> -- 
>> 2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ