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

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 of: Move CPU node related functions to their own file 2023-04-13 17:46:34 -05:00
device.c Devicetree updates for v6.6: 2023-08-30 16:59:03 -07:00
dynamic.c of: dynamic: Synchronize of_changeset_destroy() with the devlink removals 2024-04-10 16:36:03 +02:00
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 of: make OF_EARLY_FLATTREE depend on HAS_IOMEM 2023-07-10 08:48:35 -06:00
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 Char/Misc drivers for 6.4-rc1 2023-04-27 12:07:50 -07:00
module.c of: module: add buffer overflow check in of_modalias() 2024-06-12 11:12:10 +02:00
of_numa.c
of_private.h of/irq: Factor out parsing of interrupt-map parent phandle+args from of_irq_parse_raw() 2024-07-25 09:50:43 +02:00
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 of: overlay: Reorder struct fragment fields kerneldoc 2023-10-02 11:34:23 -05:00
pdt.c
platform.c of: Move of_skipped_node_table within #ifdef CONFIG_OF_ADDRESS 2023-08-22 12:53:11 -05:00
property.c of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing 2024-03-06 14:48:39 +00:00
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