]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI: property: Fix fwnode refcount leak in acpi_fwnode_graph_parse_endpoint()
authorHaotian Zhang <vulab@iscas.ac.cn>
Tue, 11 Nov 2025 07:50:00 +0000 (15:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 12:54:58 +0000 (13:54 +0100)
commit9b2e70df6dd02a7180654ad2d795f87ec4b45e4d
treef260d2b99310e3390e9dffdc6c7daf8e700fad10
parente5c2503696ec2e0dc7b2aee902dc859ccde39ddf
ACPI: property: Fix fwnode refcount leak in acpi_fwnode_graph_parse_endpoint()

[ Upstream commit 593ee49222a0d751062fd9a5e4a963ade4ec028a ]

acpi_fwnode_graph_parse_endpoint() calls fwnode_get_parent() to obtain the
parent fwnode but returns without calling fwnode_handle_put() on it. This
potentially leads to a fwnode refcount leak and prevents the parent node
from being released properly.

Call fwnode_handle_put() on the parent fwnode before returning to prevent
the leak from occurring.

Fixes: 3b27d00e7b6d ("device property: Move fwnode graph ops to firmware specific locations")
Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
[ rjw: Changelog edits ]
Link: https://patch.msgid.link/20251111075000.1828-1-vulab@iscas.ac.cn
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/property.c