Skip to content

Commit

Permalink
ACPI: configfs: Add missing config_item_put() to fix refcount leak
Browse files Browse the repository at this point in the history
commit 9a2e849 upstream.

config_item_put() should be called in the drop_item callback, to
decrement refcount for the config item.

Fixes: 772bf1e ("ACPI: configfs: Unload SSDT on configfs entry removal")
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
[ rjw: Subject edit ]
Cc: 4.13+ <stable@vger.kernel.org> # 4.13+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
guohanjun authored and gregkh committed Nov 5, 2020
1 parent 36ed9e6 commit 3b224e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/acpi_configfs.c
Expand Up @@ -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 = {
Expand Down

0 comments on commit 3b224e0

Please sign in to comment.