summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2015-10-19 10:26:02 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-10-22 02:05:06 +0200
commitaaa93a618b3f1a94f70b09f9e22481d4a51976d0 (patch)
tree5f4dd43bf8cb1c5b22650dcf341116a67d1c8c19 /drivers/acpi
parent4d946f7970e51d80f8358e0a619dfb17d89e0920 (diff)
ACPICA: Debugger: Fix dead lock issue ocurred in single stepping mode
ACPICA commit 35273add90da19cd8790fdb5735f52e3c9861684 When single step execution is not ended, executing another control methods leads to dead locks around interpreter lock/namespace lock/method serialization lock. So we should only allow one execution from the debugger at same time. Lv Zheng. Link: https://github.com/acpica/acpica/commit/35273add Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpica/dbexec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/dbexec.c b/drivers/acpi/acpica/dbexec.c
index 258e6157c658..d713e2df65b9 100644
--- a/drivers/acpi/acpica/dbexec.c
+++ b/drivers/acpi/acpica/dbexec.c
@@ -370,7 +370,17 @@ acpi_db_execute(char *name, char **args, acpi_object_type * types, u32 flags)
#ifdef ACPI_DEBUG_OUTPUT
u32 previous_allocations;
u32 allocations;
+#endif
+ /*
+ * Allow one execution to be performed by debugger or single step
+ * execution will be dead locked by the interpreter mutexes.
+ */
+ if (acpi_gbl_method_executing) {
+ acpi_os_printf("Only one debugger execution is allowed.\n");
+ return;
+ }
+#ifdef ACPI_DEBUG_OUTPUT
/* Memory allocation tracking */
previous_allocations = acpi_db_get_outstanding_allocations();