* [PATCH] ARM: Fix refcount leak in axxia_boot_secondary
@ 2022-05-12 2:06 Miaoqian Lin
2022-05-12 6:35 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Miaoqian Lin @ 2022-05-12 2:06 UTC (permalink / raw)
To: Russell King, Miaoqian Lin, Linus Walleij, Anders Berg,
Arnd Bergmann, linux-arm-kernel, linux-kernel
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: 1d22924e1c4e ("ARM: Add platform support for LSI AXM55xx SoC")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
arch/arm/mach-axxia/platsmp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c
index 512943eae30a..2e203626eda5 100644
--- a/arch/arm/mach-axxia/platsmp.c
+++ b/arch/arm/mach-axxia/platsmp.c
@@ -39,6 +39,7 @@ static int axxia_boot_secondary(unsigned int cpu, struct task_struct *idle)
return -ENOENT;
syscon = of_iomap(syscon_np, 0);
+ of_node_put(syscon_np);
if (!syscon)
return -ENOMEM;
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: Fix refcount leak in axxia_boot_secondary
2022-05-12 2:06 [PATCH] ARM: Fix refcount leak in axxia_boot_secondary Miaoqian Lin
@ 2022-05-12 6:35 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2022-05-12 6:35 UTC (permalink / raw)
To: Miaoqian Lin
Cc: Russell King, Linus Walleij, Anders Berg, Arnd Bergmann,
Linux ARM, Linux Kernel Mailing List
On Thu, May 12, 2022 at 4:06 AM Miaoqian Lin <linmq006@gmail.com> wrote:
>
> 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: 1d22924e1c4e ("ARM: Add platform support for LSI AXM55xx SoC")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
This looks good to me, thanks a lot for the fixes. The arch/arm/mach-*/
patches usually get picked up by platform maintainers, but not all of
them are very active.
I would suggest you wait a few more days for individual maintainers to either
pick up, ack or nack the patches. For those that you get either an Ack or
no reply, please resend them to soc@kernel.org, and I'll apply them to
the soc tree directly.
Arnd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-12 6:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 2:06 [PATCH] ARM: Fix refcount leak in axxia_boot_secondary Miaoqian Lin
2022-05-12 6:35 ` Arnd Bergmann
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®