kernel_samsung_a53x/drivers/of
Zijun Hu 6e865e3b42 of: Fix refcount leakage for OF node returned by __of_get_dma_parent()
commit 5d009e024056ded20c5bb1583146b833b23bbd5a 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: f83a6e5dea6c ("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>
2025-01-15 16:29:47 +01:00
..
unittest-data of: Fix double free in of_parse_phandle_with_args_map 2024-11-18 12:12:43 +01:00
address.c of: Fix refcount leakage for OF node returned by __of_get_dma_parent() 2025-01-15 16:29:47 +01:00
base.c of: Fix error path in of_parse_phandle_with_args_map() 2025-01-15 16:29:47 +01:00
device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dynamic.c of: dynamic: Synchronize of_changeset_destroy() with the devlink removals 2024-11-19 09:23:10 +01:00
fdt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fdt_address.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq.c Revert "of/irq: Prevent device address out-of-bounds read in interrupt map walk" 2024-11-24 00:23:38 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kobj.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
of_net.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
of_numa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
of_private.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
of_reserved_mem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
overlay.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pdt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
platform.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
property.c of: property: fix typo in io-channels 2024-11-18 12:13:33 +01:00
resolver.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
unittest.c of: unittest: Fix compile in the non-dynamic case 2024-11-18 12:13:28 +01:00