Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: mstar: fix two device_node refcount leaks in mstarv7.c
@ 2026-06-10  5:33 Weigang He
  2026-06-10  5:33 ` [PATCH 1/2] ARM: mstar: fix device_node refcount leak in mstarv7_boot_secondary() Weigang He
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Weigang He @ 2026-06-10  5:33 UTC (permalink / raw)
  To: Daniel Palmer
  Cc: Romain Perier, Arnd Bergmann, linux-arm-kernel, linux-kernel,
	Weigang He

mstarv7.c leaks the device_node reference taken by
of_find_compatible_node() in two __init paths: mstarv7_boot_secondary()
(the "mstar,smpctrl" node) and mstarv7_init() (the "mstar,l3bridge"
node). of_iomap() does not take ownership of the node, so each is a
one-shot device_node refcount leak per boot.

The two leaks were introduced by different commits, so they are split
into one patch each. Both drop the reference right after of_iomap().

Found by static analysis tool CodeQL. The series is build-tested only
(arm, multi_v7_defconfig + CONFIG_ARCH_MSTARV7); I have no mstar
hardware, so runtime testing would be appreciated.

Weigang He (2):
  ARM: mstar: fix device_node refcount leak in mstarv7_boot_secondary()
  ARM: mstar: fix device_node refcount leak in mstarv7_init()

 arch/arm/mach-mstar/mstarv7.c | 2 ++
 1 file changed, 2 insertions(+)


base-commit: 0f61b1860cc3f52aef9036d7235ed1f017632193
-- 
2.43.0



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-10  8:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10  5:33 [PATCH 0/2] ARM: mstar: fix two device_node refcount leaks in mstarv7.c Weigang He
2026-06-10  5:33 ` [PATCH 1/2] ARM: mstar: fix device_node refcount leak in mstarv7_boot_secondary() Weigang He
2026-06-10  5:33 ` [PATCH 2/2] ARM: mstar: fix device_node refcount leak in mstarv7_init() Weigang He
2026-06-10  8:45 ` [PATCH 0/2] ARM: mstar: fix two device_node refcount leaks in mstarv7.c Daniel Palmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox