Skip to content

Commit 593ee49

Browse files
ISCAS-Vulabrafaeljw
authored andcommitted
ACPI: property: Fix fwnode refcount leak in acpi_fwnode_graph_parse_endpoint()
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: 3b27d00 ("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>
1 parent b889ed5 commit 593ee49

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/acpi/property.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,6 +1718,7 @@ static int acpi_fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
17181718
if (fwnode_property_read_u32(fwnode, "reg", &endpoint->id))
17191719
fwnode_property_read_u32(fwnode, "endpoint", &endpoint->id);
17201720

1721+
fwnode_handle_put(port_fwnode);
17211722
return 0;
17221723
}
17231724

0 commit comments

Comments
 (0)