lkml.org 
[lkml]   [2015]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline()
On 2015/4/11 7:31, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> acpi_scan_is_offline() may be called under the physical_node_lock
> of the given device object's parent, so prevent lockdep from
> complaining about that by annotating that instance with
> SINGLE_DEPTH_NESTING.
>
> Reported-by: Xie XiuQi <xiexiuqi@huawei.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Tested-by: Xie XiuQi <xiexiuqi@huawei.com>

Thanks,
Xie XiuQi

> ---
> drivers/acpi/scan.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> Index: linux-pm/drivers/acpi/scan.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/scan.c
> +++ linux-pm/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) {
>
>
> .
>




\
 
 \ /
  Last update: 2015-04-17 10:01    [W:0.130 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site