[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220512085659.678db0b3@donnerap.cambridge.arm.com>
Date: Thu, 12 May 2022 08:56:59 +0100
From: Andre Przywara <andre.przywara@....com>
To: Miaoqian Lin <linmq006@...il.com>
Cc: Russell King <linux@...linux.org.uk>,
Rob Herring <rob.herring@...xeda.com>,
Jamie Iles <jamie@...ieiles.com>,
Shawn Guo <shawn.guo@...aro.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Arnd Bergmann <arnd@...db.de>, Olof Johansson <olof@...om.net>
Subject: Re: [PATCH] ARM: highbank: Fix refcount leak in highbank_init
On Thu, 12 May 2022 07:12:58 +0400
Miaoqian Lin <linmq006@...il.com> wrote:
Hi,
> of_find_compatible_node() 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: 220e6cf7b793 ("ARM: add Highbank core platform support")
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
That is basically the same patch as this one:
https://lore.kernel.org/linux-arm-kernel/20220408094817.2494756-1-lv.ruyi@zte.com.cn/
Arnd, Olof, can you please take the older one through the soc tree? Maybe
adding the Fixes tag from this one?
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..af9488854fe3 100644
> --- a/arch/arm/mach-highbank/highbank.c
> +++ b/arch/arm/mach-highbank/highbank.c
> @@ -142,6 +142,7 @@ static void __init highbank_init(void)
> np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
> sregs_base = of_iomap(np, 0);
> WARN_ON(!sregs_base);
> + of_node_put(np);
>
> pm_power_off = highbank_power_off;
> highbank_pm_init();
Powered by blists - more mailing lists