aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>2007-02-15 16:12:23 -0500
committerLen Brown <len.brown@intel.com>2007-02-15 16:13:16 -0500
commitc0d127b56937c3e72c2b1819161d2f6718eee877 (patch)
tree40ac0fd3a628685ce25d11d1b00360344279ec5b /include
parent724339d76d9407cd1a8ad32a9c1fdf64840cc51b (diff)
ACPICA: fix AML mutex re-entrancy
ACPI AML supports "serialized" methods which are protected by an implicit mutex. The mutex is re-entrant for that AML thread to allow recursion. However, Linux implements notify() by creating a new AML thread. So for systems where notify() re-enters a serialized method, deadlock results. The fix is to use the Linux thread_id as the key to allowing re-entrancy, not the AML thread pointer. http://bugzilla.kernel.org/show_bug.cgi?id=5534 Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acinterp.h3
-rw-r--r--include/acpi/acobject.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h
index ce7c9d653910..73967c8152d3 100644
--- a/include/acpi/acinterp.h
+++ b/include/acpi/acinterp.h
@@ -253,7 +253,8 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
253 253
254void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread); 254void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread);
255 255
256void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc); 256void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc,
257 struct acpi_thread_state *thread);
257 258
258/* 259/*
259 * exprep - ACPI AML execution - prep utilities 260 * exprep - ACPI AML execution - prep utilities
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h
index 04e9735a6742..5206d61d74a6 100644
--- a/include/acpi/acobject.h
+++ b/include/acpi/acobject.h
@@ -155,7 +155,7 @@ struct acpi_object_event {
155struct acpi_object_mutex { 155struct acpi_object_mutex {
156 ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */ 156 ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */
157 u16 acquisition_depth; /* Allow multiple Acquires, same thread */ 157 u16 acquisition_depth; /* Allow multiple Acquires, same thread */
158 struct acpi_thread_state *owner_thread; /* Current owner of the mutex */ 158 acpi_thread_id owner_thread_id; /* Current owner of the mutex */
159 acpi_mutex os_mutex; /* Actual OS synchronization object */ 159 acpi_mutex os_mutex; /* Actual OS synchronization object */
160 union acpi_operand_object *prev; /* Link for list of acquired mutexes */ 160 union acpi_operand_object *prev; /* Link for list of acquired mutexes */
161 union acpi_operand_object *next; /* Link for list of acquired mutexes */ 161 union acpi_operand_object *next; /* Link for list of acquired mutexes */