linux-yocto/drivers/of
Zijun Hu 81435b85b2 of: resolver: Fix device node refcount leakage in of_resolve_phandles()
[ Upstream commit a46a080563 ]

In of_resolve_phandles(), refcount of device node @local_fixups will be
increased if the for_each_child_of_node() exits early, but nowhere to
decrease the refcount, so cause refcount leakage for the node.

Fix by using __free() on @local_fixups.

Fixes: da56d04c80 ("of/resolver: Switch to new local fixups format.")
Cc: stable@vger.kernel.org
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20250209-of_irq_fix-v2-9-93e3a2659aa7@quicinc.com
[robh: Use __free() instead]
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:50:41 +02:00
..
unittest-data of/unittest: Add test that of_address_to_resource() fails on non-translatable address 2025-02-01 18:37:51 +01:00
address.c of: address: Preserve the flags portion on 1:1 dma-ranges mapping 2025-01-09 13:31:49 +01:00
base.c of: Fix of_find_node_opts_by_path() handling of alias+path+options 2025-02-17 09:40:21 +01:00
cpu.c
device.c
dynamic.c
fdt_address.c
fdt.c of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-12-09 10:31:56 +01:00
irq.c of/irq: Fix device node refcount leakages in of_irq_init() 2025-04-25 10:45:36 +02:00
Kconfig
kexec.c of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify 2024-12-09 10:31:56 +01:00
kobj.c
Makefile
module.c
of_numa.c
of_private.h
of_reserved_mem.c Revert "of: reserved-memory: Fix using wrong number of cells to get property 'alignment'" 2025-03-13 12:58:22 +01:00
overlay.c
pdt.c
platform.c
property.c
resolver.c of: resolver: Fix device node refcount leakage in of_resolve_phandles() 2025-05-02 07:50:41 +02:00
unittest.c of/unittest: Add test that of_address_to_resource() fails on non-translatable address 2025-02-01 18:37:51 +01:00