mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: vexpress: fix two device_node refcount leaks
@ 2026-09-25 17:32 Weigang He
  2026-09-25 17:32 ` [PATCH 1/2] ARM: vexpress: fix device_node refcount leak in vexpress_flags_set() Weigang He
  2026-09-25 17:32 ` [PATCH 2/2] ARM: vexpress: fix device_node refcount leak in vexpress_smp_dt_prepare_cpus() Weigang He
  0 siblings, 2 replies; 3+ messages in thread
From: Weigang He @ 2026-09-25 17:32 UTC (permalink / raw)
  To: Liviu Dudau, Sudeep Holla, Lorenzo Pieralisi
  Cc: Linus Walleij, Russell King, Lee Jones, linux-arm-kernel,
	linux-kernel, Weigang He

The Versatile Express SMP bring-up path leaks two device_node references
during boot:

  - vexpress_flags_set() (mach-versatile/v2m.c) leaks the
    "arm,vexpress-sysreg" node obtained via of_find_compatible_node().
  - vexpress_smp_dt_prepare_cpus() (mach-versatile/platsmp-vexpress.c)
    leaks the SCU node obtained via of_find_matching_node().

of_iomap() does not take ownership of the node, so each is a one-shot
refcount leak with no functional impact. They were introduced by
different commits, so they are split into one patch each.

The first leak was reported by static analysis (CodeQL); the second was
found while reviewing that report. The CodeQL query was synthesized
with LLM assistance, and the patches were drafted with LLM assistance;
I have reviewed them.

Compile-tested only (ARCH=arm multi_v7_defconfig, W=1); I have no
Versatile Express hardware.

Weigang He (2):
  ARM: vexpress: fix device_node refcount leak in vexpress_flags_set()
  ARM: vexpress: fix device_node refcount leak in
    vexpress_smp_dt_prepare_cpus()

 arch/arm/mach-versatile/platsmp-vexpress.c | 4 ++--
 arch/arm/mach-versatile/v2m.c              | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)


base-commit: 165768bb70265b5c38cf0b73fafd75be235f8b14
-- 
2.43.0


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

end of thread, other threads:[~2026-09-25 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 17:32 [PATCH 0/2] ARM: vexpress: fix two device_node refcount leaks Weigang He
2026-09-25 17:32 ` [PATCH 1/2] ARM: vexpress: fix device_node refcount leak in vexpress_flags_set() Weigang He
2026-09-25 17:32 ` [PATCH 2/2] ARM: vexpress: fix device_node refcount leak in vexpress_smp_dt_prepare_cpus() Weigang He

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®