diff options
Diffstat (limited to 'drivers/acpi/namespace/nsalloc.c')
-rw-r--r-- | drivers/acpi/namespace/nsalloc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c index dc3f0739a46b..55b407aae266 100644 --- a/drivers/acpi/namespace/nsalloc.c +++ b/drivers/acpi/namespace/nsalloc.c | |||
@@ -386,14 +386,17 @@ void acpi_ns_delete_namespace_subtree(struct acpi_namespace_node *parent_node) | |||
386 | * specific ID. Used to delete entire ACPI tables. All | 386 | * specific ID. Used to delete entire ACPI tables. All |
387 | * reference counts are updated. | 387 | * reference counts are updated. |
388 | * | 388 | * |
389 | * MUTEX: Locks namespace during deletion walk. | ||
390 | * | ||
389 | ******************************************************************************/ | 391 | ******************************************************************************/ |
390 | 392 | ||
391 | void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id) | 393 | void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id) |
392 | { | 394 | { |
393 | struct acpi_namespace_node *child_node; | 395 | struct acpi_namespace_node *child_node; |
394 | struct acpi_namespace_node *deletion_node; | 396 | struct acpi_namespace_node *deletion_node; |
395 | u32 level; | ||
396 | struct acpi_namespace_node *parent_node; | 397 | struct acpi_namespace_node *parent_node; |
398 | u32 level; | ||
399 | acpi_status status; | ||
397 | 400 | ||
398 | ACPI_FUNCTION_TRACE_U32(ns_delete_namespace_by_owner, owner_id); | 401 | ACPI_FUNCTION_TRACE_U32(ns_delete_namespace_by_owner, owner_id); |
399 | 402 | ||
@@ -401,6 +404,13 @@ void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id) | |||
401 | return_VOID; | 404 | return_VOID; |
402 | } | 405 | } |
403 | 406 | ||
407 | /* Lock namespace for possible update */ | ||
408 | |||
409 | status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); | ||
410 | if (ACPI_FAILURE(status)) { | ||
411 | return_VOID; | ||
412 | } | ||
413 | |||
404 | deletion_node = NULL; | 414 | deletion_node = NULL; |
405 | parent_node = acpi_gbl_root_node; | 415 | parent_node = acpi_gbl_root_node; |
406 | child_node = NULL; | 416 | child_node = NULL; |
@@ -469,5 +479,6 @@ void acpi_ns_delete_namespace_by_owner(acpi_owner_id owner_id) | |||
469 | } | 479 | } |
470 | } | 480 | } |
471 | 481 | ||
482 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | ||
472 | return_VOID; | 483 | return_VOID; |
473 | } | 484 | } |