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
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
dynamic.c of: dynamic: Synchronize of_changeset_destroy() with the devlink removals 2024-11-19 09:23:10 +01:00
fdt.c
fdt_address.c
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
kobj.c
Makefile
of_net.c
of_numa.c
of_private.h
of_reserved_mem.c
overlay.c
pdt.c
platform.c
property.c of: property: fix typo in io-channels 2024-11-18 12:13:33 +01:00
resolver.c
unittest.c of: unittest: Fix compile in the non-dynamic case 2024-11-18 12:13:28 +01:00