All of lore.kernel.org
 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
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ 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] 6+ messages in thread

end of thread, other threads:[~2026-10-07 14:31 UTC | newest]

Thread overview: 6+ 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-30 20:48   ` Liviu Dudau
2026-09-25 17:32 ` [PATCH 2/2] ARM: vexpress: fix device_node refcount leak in vexpress_smp_dt_prepare_cpus() Weigang He
2026-09-30 20:50   ` Liviu Dudau
2026-10-07 14:30 ` [PATCH 0/2] ARM: vexpress: fix two device_node refcount leaks Sudeep Holla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.