mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: Len Brown <[email protected]>
This commit is contained in:
parent
724339d76d
commit
c0d127b569
6 changed files with 25 additions and 31 deletions
|
|
@ -253,7 +253,8 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
|
|||
|
||||
void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread);
|
||||
|
||||
void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc);
|
||||
void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc,
|
||||
struct acpi_thread_state *thread);
|
||||
|
||||
/*
|
||||
* exprep - ACPI AML execution - prep utilities
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ struct acpi_object_event {
|
|||
struct acpi_object_mutex {
|
||||
ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */
|
||||
u16 acquisition_depth; /* Allow multiple Acquires, same thread */
|
||||
struct acpi_thread_state *owner_thread; /* Current owner of the mutex */
|
||||
acpi_thread_id owner_thread_id; /* Current owner of the mutex */
|
||||
acpi_mutex os_mutex; /* Actual OS synchronization object */
|
||||
union acpi_operand_object *prev; /* Link for list of acquired mutexes */
|
||||
union acpi_operand_object *next; /* Link for list of acquired mutexes */
|
||||
|
|
|
|||
Loading…
Reference in a new issue