diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-04-18 01:25:46 +0200 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-05-17 19:12:16 -0400 |
commit | fc69ac41da31ca159027b524592ede98c7dfc7e5 (patch) | |
tree | 7fd3ec634bb47714b008fae89ddc4977df1e67b2 | |
parent | 6fd1b9912fb3d74d928cbc8157800cf93e594724 (diff) |
ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline()
[ Upstream commit 4c533c801d1c9b5c38458a0e7516e0cf50643782 ]
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 <xiexiuqi@huawei.com>
Reviewed-by: Toshi Kani <toshi.kani@hp.com>
Cc: 3.14+ <stable@vger.kernel.org> # 3.14+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r-- | drivers/acpi/scan.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index c9ea3dfb4974..0446d0d5efa5 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -251,7 +251,11 @@ bool acpi_scan_is_offline(struct acpi_device *adev, bool uevent) 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) { |