提交 4c533c80 编写于 作者: R Rafael J. Wysocki 提交者: Rafael J. Wysocki

ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline()

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: caa73ea1 (ACPI / hotplug / driver core: Handle containers in a special way)
Reported-and-tested-by: NXie XiuQi <xiexiuqi@huawei.com>
Reviewed-by: NToshi Kani <toshi.kani@hp.com>
Cc: 3.14+ <stable@vger.kernel.org> # 3.14+
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 5f2e3274
......@@ -375,7 +375,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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册