Skip to contentSkip to conversation

ARM: Fix refcount leak in axxia_boot_secondary

PATCH In review Miaoqian Lin 2 participants 2 messages May 12, 2022

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

PATCH 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")
---
 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
Quoted 7 lines · Miaoqian Lin

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

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 [email protected], and I'll apply them to the soc tree directly.

Arnd