From: Andre Przywara <andre.przywara@arm.com>
To: Miaoqian Lin <linmq006@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>,
Rob Herring <rob.herring@calxeda.com>,
Jamie Iles <jamie@jamieiles.com>,
Shawn Guo <shawn.guo@linaro.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Olof Johansson <olof@lixom.net>
Subject: Re: [PATCH] ARM: highbank: Fix refcount leak in highbank_init
Date: Thu, 12 May 2022 08:56:59 +0100 [thread overview]
Message-ID: <20220512085659.678db0b3@donnerap.cambridge.arm.com> (raw)
In-Reply-To: <20220512031259.56459-1-linmq006@gmail.com>
On Thu, 12 May 2022 07:12:58 +0400
Miaoqian Lin <linmq006@gmail.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@gmail.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();
prev parent reply other threads:[~2022-05-12 7:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 3:12 Miaoqian Lin
2022-05-12 7:56 ` Andre Przywara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220512085659.678db0b3@donnerap.cambridge.arm.com \
--to=andre.przywara@arm.com \
--cc=arnd@arndb.de \
--cc=jamie@jamieiles.com \
--cc=linmq006@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=olof@lixom.net \
--cc=rob.herring@calxeda.com \
--cc=shawn.guo@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®