diff options
author | Bob Moore <robert.moore@intel.com> | 2011-01-11 20:13:31 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-01-18 23:47:55 -0500 |
commit | 672af843abfc9a41c7ec792722e04b6c68a3cfea (patch) | |
tree | 3aeb44daa826c02abb8621b01ffad47565f914bc /drivers/acpi | |
parent | 5d3131f5b0ae6303d042fd91ed9147ad4ae4bf6d (diff) |
ACPICA: Debugger: Lock namespace for duration of a namespace dump
Prevents issues if the namespace is changing underneath the
debugger. Especially temporary nodes, since the debugger displays
these also.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Reviewed-by: Rafael Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/nsdump.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c index a54dc39e304b..82693c3eb257 100644 --- a/drivers/acpi/acpica/nsdump.c +++ b/drivers/acpi/acpica/nsdump.c | |||
@@ -624,9 +624,22 @@ acpi_ns_dump_objects(acpi_object_type type, | |||
624 | acpi_owner_id owner_id, acpi_handle start_handle) | 624 | acpi_owner_id owner_id, acpi_handle start_handle) |
625 | { | 625 | { |
626 | struct acpi_walk_info info; | 626 | struct acpi_walk_info info; |
627 | acpi_status status; | ||
627 | 628 | ||
628 | ACPI_FUNCTION_ENTRY(); | 629 | ACPI_FUNCTION_ENTRY(); |
629 | 630 | ||
631 | /* | ||
632 | * Just lock the entire namespace for the duration of the dump. | ||
633 | * We don't want any changes to the namespace during this time, | ||
634 | * especially the temporary nodes since we are going to display | ||
635 | * them also. | ||
636 | */ | ||
637 | status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); | ||
638 | if (ACPI_FAILURE(status)) { | ||
639 | acpi_os_printf("Could not acquire namespace mutex\n"); | ||
640 | return; | ||
641 | } | ||
642 | |||
630 | info.debug_level = ACPI_LV_TABLES; | 643 | info.debug_level = ACPI_LV_TABLES; |
631 | info.owner_id = owner_id; | 644 | info.owner_id = owner_id; |
632 | info.display_type = display_type; | 645 | info.display_type = display_type; |
@@ -636,6 +649,8 @@ acpi_ns_dump_objects(acpi_object_type type, | |||
636 | ACPI_NS_WALK_TEMP_NODES, | 649 | ACPI_NS_WALK_TEMP_NODES, |
637 | acpi_ns_dump_one_object, NULL, | 650 | acpi_ns_dump_one_object, NULL, |
638 | (void *)&info, NULL); | 651 | (void *)&info, NULL); |
652 | |||
653 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | ||
639 | } | 654 | } |
640 | #endif /* ACPI_FUTURE_USAGE */ | 655 | #endif /* ACPI_FUTURE_USAGE */ |
641 | 656 | ||