From patchwork Tue Nov 3 20:34:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 317193 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5035DC2D0A3 for ; Tue, 3 Nov 2020 20:45:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1486622404 for ; Tue, 3 Nov 2020 20:45:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604436332; bh=H8vg+CkTwI8Qs533J24DXE2p4lvFzJ5TfZejmDk0hRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=NgTOd6VffnS0sn0DGNgd5fwLk19Qe+G3f3dSgIBZJpfI6O4CLwCIWULo4gCO2J3pX lWeDZMk0gf4i94JfVBv7l9OJSb0mtCkdxCGUwEv0rrSuB4e7Nh51SDGE6oszxVe6BV rRLxZmACX3Nm68zmhRGL1Wpetpo/Nmh+Ws9V83Zo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731040AbgKCUpb (ORCPT ); Tue, 3 Nov 2020 15:45:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:33828 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731036AbgKCUpa (ORCPT ); Tue, 3 Nov 2020 15:45:30 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D60AF223EA; Tue, 3 Nov 2020 20:45:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604436330; bh=H8vg+CkTwI8Qs533J24DXE2p4lvFzJ5TfZejmDk0hRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fVhRqhQzyRk4jtzwGkwQ/W2PSooxTS3PRLcD+ZqLDN01L6iyxETY2tHNahyT7mFn2 ATM5SQWRxw41HFGqkZuJZ7VBkaRxTEs9HoTz9e9LqmEEM0HZu2UAddo+/51EwhAYQI hUH7M3lo1fcuF+7KQqd4Aj12DwejqwK7Iv/fQDt8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hanjun Guo , "Rafael J. Wysocki" Subject: [PATCH 5.9 203/391] ACPI: configfs: Add missing config_item_put() to fix refcount leak Date: Tue, 3 Nov 2020 21:34:14 +0100 Message-Id: <20201103203400.591849167@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203348.153465465@linuxfoundation.org> References: <20201103203348.153465465@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Hanjun Guo commit 9a2e849fb6de471b82d19989a7944d3b7671793c upstream. 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 [ rjw: Subject edit ] Cc: 4.13+ # 4.13+ Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/acpi_configfs.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/acpi/acpi_configfs.c +++ b/drivers/acpi/acpi_configfs.c @@ -228,6 +228,7 @@ static void acpi_table_drop_item(struct 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 = {