ACPI: configfs: Add the missing config_item_put() to fix refcount leak
PATCH 1/1 ACPI: configfs: Add the missing config_item_put() to fix refcount leak
config_item_put() should be called in the drop_item callback, to decrement refcount for the config item.
Fixes 772bf1e2878ec ("ACPI: configfs: Unload SSDT on configfs entry removal")
Signed-off-by Hanjun Guo <[email protected]>
--- drivers/acpi/acpi_configfs.c | 1 + 1 file changed, 1 insertion(+)
drivers/acpi/acpi_configfs.c +1 -0
@@ -228,6 +228,7 @@ static void acpi_table_drop_item(struct config_group *group,ACPI_INFO (("Host-directed Dynamic ACPI Table Unload" ));acpi_unload_table (table->index); +config_item_put (cfg); }static struct configfs_group_operations acpi_table_group_ops = {
Signature · 1 line
1.7.12.4
Quoted 15 lines · Hanjun Guo
config_item_put()should be called in thedrop_itemcallback, to decrement refcount for the config item.Fixes 772bf1e2878ec ("ACPI: configfs: Unload SSDT on configfs entry removal")Signed-off-by Hanjun Guo <[email protected]>--- drivers/acpi/acpi_configfs.c | 1 + 1 file changed, 1 insertion(+)drivers/acpi/acpi_configfs.c +0
-0
drivers/acpi/acpi_configfs.c static void acpi_table_drop_item(struct config_group *group,
Quoted 8 lines
drivers/acpi/acpi_configfs.c +1
-1@@ -228,6 +228,7 @@ static void acpi_table_drop_item(struct config_group *group,ACPI_INFO (("Host-directed Dynamic ACPI Table Unload" ));acpi_unload_table (table->index); +config_item_put (cfg); }static struct configfs_group_operations acpi_table_group_ops = { --
Applied as 5.10 material with a minor edit in the subject, thanks!