Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1948231AbbEBU64 (ORCPT ); Sat, 2 May 2015 16:58:56 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45154 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946092AbbEBTXX (ORCPT ); Sat, 2 May 2015 15:23:23 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Toshi Kani , "Rafael J. Wysocki" Subject: [PATCH 4.0 157/220] ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline() Date: Sat, 2 May 2015 21:01:12 +0200 Message-Id: <20150502185901.123541027@linuxfoundation.org> X-Mailer: git-send-email 2.3.7 In-Reply-To: <20150502185854.333748961@linuxfoundation.org> References: <20150502185854.333748961@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1626 Lines: 45 4.0-stable review patch. If anyone has any objections, please let me know. ------------------ From: "Rafael J. Wysocki" commit 4c533c801d1c9b5c38458a0e7516e0cf50643782 upstream. acpi_scan_is_offline() may be called under the physical_node_lock lock of the given device object's parent, so prevent lockdep from complaining about that by annotating that instance with SINGLE_DEPTH_NESTING. Fixes: caa73ea158de (ACPI / hotplug / driver core: Handle containers in a special way) Reported-and-tested-by: Xie XiuQi Reviewed-by: Toshi Kani Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/scan.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -298,7 +298,11 @@ bool acpi_scan_is_offline(struct acpi_de struct acpi_device_physical_node *pn; bool offline = true; - mutex_lock(&adev->physical_node_lock); + /* + * acpi_container_offline() calls this for all of the container's + * children under the container's physical_node_lock lock. + */ + mutex_lock_nested(&adev->physical_node_lock, SINGLE_DEPTH_NESTING); list_for_each_entry(pn, &adev->physical_node_list, node) if (device_supports_offline(pn->dev) && !pn->dev->offline) { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/