Skip to contentSkip to conversation

ARM: Fix refcount leak in axxia_boot_secondary

PATCH RESEND Applied Miaoqian Lin 2 participants 2 messages Jun 1, 2022 – Jun 14, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 ARM: Fix refcount leak in axxia_boot_secondary

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")

---
I follow the instruction to resend this patch to [email protected].

v1 link:
https://lore.kernel.org/all/[email protected]/

---
 arch/arm/mach-axxia/platsmp.c | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-axxia/platsmp.c +1 -0
index 512943eae30a..2e203626eda5 100644
@@ -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;
 
Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to soc/soc.git (arm/fixes) by Arnd Bergmann <[email protected]>:

Hello:

This patch was applied to soc/soc.git (arm/fixes)
by Arnd Bergmann <[email protected]>:

Quoted 8 lines · On Wed, 1 Jun 2022 13:05:48 +0400 you 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")

[...]

Here is the summary with links:
- [RESEND] ARM: Fix refcount leak in axxia_boot_secondary

    https://git.kernel.org/soc/soc/c/7c7ff68daa93

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html