ACPICA: Dispatcher: Fix a mutex issue for method auto serialization
ACPICA commit fd305eda14f1a1e684edef4fac53f194bf00ed3f This patch fixes an issue with acpi_ds_auto_serialized_method(). The parser will invoke acpi_ex_release_all_mutexes(), which in return cause mutexes held in ACPI_ERROR_METHOD() failed. Lv Zheng. Link: https://bugs.acpica.org/show_bug.cgi?id=1324 Link: https://github.com/acpica/acpica/commit/fd305eda Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Tested-by: Greg White <gwhite@kupulau.com> Tested-by: Dutch Guy <lucht_piloot@gmx.net> 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>
This commit is contained in:
Родитель
74f51b80a0
Коммит
441ad11d07
|
@ -99,11 +99,14 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,
|
|||
"Method auto-serialization parse [%4.4s] %p\n",
|
||||
acpi_ut_get_node_name(node), node));
|
||||
|
||||
acpi_ex_enter_interpreter();
|
||||
|
||||
/* Create/Init a root op for the method parse tree */
|
||||
|
||||
op = acpi_ps_alloc_op(AML_METHOD_OP, obj_desc->method.aml_start);
|
||||
if (!op) {
|
||||
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||
status = AE_NO_MEMORY;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
acpi_ps_set_name(op, node->name.integer);
|
||||
|
@ -115,7 +118,8 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,
|
|||
acpi_ds_create_walk_state(node->owner_id, NULL, NULL, NULL);
|
||||
if (!walk_state) {
|
||||
acpi_ps_free_op(op);
|
||||
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||
status = AE_NO_MEMORY;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
status = acpi_ds_init_aml_walk(walk_state, op, node,
|
||||
|
@ -134,6 +138,8 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node,
|
|||
status = acpi_ps_parse_aml(walk_state);
|
||||
|
||||
acpi_ps_delete_parse_tree(op);
|
||||
unlock:
|
||||
acpi_ex_exit_interpreter();
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
|
|
|
@ -537,9 +537,11 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
|
|||
|
||||
/* Either the method parse or actual execution failed */
|
||||
|
||||
acpi_ex_exit_interpreter();
|
||||
ACPI_ERROR_METHOD("Method parse/execution failed",
|
||||
walk_state->method_node, NULL,
|
||||
status);
|
||||
acpi_ex_enter_interpreter();
|
||||
|
||||
/* Check for possible multi-thread reentrancy problem */
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче