diff options
| author | Weigang He <geoffreyhe2@gmail.com> | 2026-09-26 03:32:52 +1000 |
|---|---|---|
| committer | Sudeep Holla <sudeep.holla@kernel.org> | 2026-10-01 09:37:40 +0100 |
| commit | 27b98d331f1dcebe088ab51a7061a387a7440cb2 (patch) | |
| tree | 11539edb2e153433f850290043eef0deaeb693c7 /scripts/checkstack.pl | |
| parent | 62b9ae8ae4a7f0b93efa1efa230782b37057b1e7 (diff) | |
ARM: vexpress: fix device_node refcount leak in vexpress_smp_dt_prepare_cpus()
vexpress_smp_dt_prepare_cpus() obtains a reference to the SCU device
node via of_find_matching_node() and passes it to of_iomap(), but never
calls of_node_put() on it. of_iomap() does not take ownership of the
node, so the reference is leaked. The function is the .smp_prepare_cpus
hook invoked once from the __init SMP bring-up path, so this is a
one-shot leak of a single refcount during boot, with no functional
impact.
Annotate scu with the __free(device_node) cleanup attribute so the
reference is released when the function returns.
Found while reviewing a CodeQL report for vexpress_flags_set() on the
same SMP bring-up path.
Fixes: d2606f81d563 ("ARM: vexpress: Simplify SMP operations for DT-powered system")
Assisted-by: LLM codeql
Signed-off-by: Weigang He <geoffreyhe2@gmail.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Link: https://patch.msgid.link/20260925173252.933705-3-geoffreyhe2@gmail.com
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
Diffstat (limited to 'scripts/checkstack.pl')
0 files changed, 0 insertions, 0 deletions
