linux/drivers/of
Zijun Hu 7094f3b6df of: Fix refcount leakage for OF node returned by __of_get_dma_parent()
commit 5d009e0240 upstream.

__of_get_dma_parent() returns OF device node @args.np, but the node's
refcount is increased twice, by both of_parse_phandle_with_args() and
of_node_get(), so causes refcount leakage for the node.

Fix by directly returning the node got by of_parse_phandle_with_args().

Fixes: f83a6e5dea ("of: address: Add support for the parent DMA bus")
Cc: stable@vger.kernel.org
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241206-of_core_fix-v1-4-dc28ed56bec3@quicinc.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-12-27 13:58:56 +01:00
..
unittest-data of: Fix double free in of_parse_phandle_with_args_map 2024-01-25 15:35:40 -08:00
address.c of: Fix refcount leakage for OF node returned by __of_get_dma_parent() 2024-12-27 13:58:56 +01:00
base.c of: Fix error path in of_parse_phandle_with_args_map() 2024-12-27 13:58:56 +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.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
fdt_address.c of: Use SPDX license tag for DT files 2018-01-08 08:22:45 -06:00
irq.c of/irq: Fix using uninitialized variable @addr_len in API of_irq_parse_one() 2024-12-27 13:58:55 +01: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 of: make of_node_ktype constant 2023-02-06 11:03:00 -06:00
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, numa: Fetch empty NUMA node ID from distance map 2021-10-04 13:13:44 -05:00
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 of: reserved_mem: Use stable allocation order 2023-06-20 09:34:58 -06:00
overlay.c of: overlay: Reorder struct fragment fields kerneldoc 2023-10-02 11:34:23 -05:00
pdt.c of: Remove struct device_node.type pointer 2019-01-10 16:24:44 -06:00
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: overlay: log the error cause on resolver failure 2020-03-02 11:32:44 -06:00
unittest.c um: Unconditionally call unflatten_device_tree() 2024-12-09 10:31:55 +01:00