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: <20220420152617.7b3c1d70@donnerap.cambridge.arm.com>
Date:   Wed, 20 Apr 2022 15:26:17 +0100
From:   Andre Przywara <andre.przywara@....com>
To:     cgel.zte@...il.com
Cc:     linux@...linux.org.uk, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, Lv Ruyi <lv.ruyi@....com.cn>,
        Zeal Robot <zealci@....com.cn>, Rob Herring <robh@...nel.org>,
        Arnd Bergmann <arnd@...db.de>, Olof Johansson <olof@...om.net>
Subject: Re: [PATCH] ARM: highbank: Fix missing of_node_put in
 highbank_init()

On Fri,  8 Apr 2022 09:48:17 +0000
cgel.zte@...il.com wrote:

Hi,

> From: Lv Ruyi <lv.ruyi@....com.cn>
> 
> of_find_compatible_node() returns node pointer with refcount incremented,
> use of_node_put() on it to decrease refcount when done.

Thanks for the patch, looks alright to me.
There is actually another occurrence in the same file, will send a patch
ASAP.

> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Lv Ruyi <lv.ruyi@....com.cn>

Fixes: 220e6cf7b793d702596506a8c4bf1f4fd4040df1 ("ARM: add Highbank core
platform support")

Reviewed-by: Andre Przywara <andre.przywara@....com>

Arnd, Olof, can you please take this through the soc tree as a fix,
whenever you find time?

Thanks!
Andre

> ---
>  arch/arm/mach-highbank/highbank.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
> index db607955a7e4..fe82c3d16ffd 100644
> --- a/arch/arm/mach-highbank/highbank.c
> +++ b/arch/arm/mach-highbank/highbank.c
> @@ -141,6 +141,7 @@ static void __init highbank_init(void)
>  	/* Map system registers */
>  	np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
>  	sregs_base = of_iomap(np, 0);
> +	of_node_put(np);
>  	WARN_ON(!sregs_base);
>  
>  	pm_power_off = highbank_power_off;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ