aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
diff options
context:
space:
mode:
authorOctavian Purdila <octavian.purdila@intel.com>2014-12-16 11:12:30 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-01-21 19:16:44 -0500
commit97d746578b1fc4ce461e6279220cab3605f02469 (patch)
treedbd4b64eceb52ef9e5ac45b104fb44c843d4a567 /drivers/acpi/acpica
parentec6f34e5b552fb0a52e6aae1a5afbbb1605cc6cc (diff)
ACPICA: take ACPI_MTX_INTERPRETER in acpi_unload_table_id()
acpi_tb_delete_namespace_by_owner() expects ACPI_MTX_INTERPRETER to be taken. This fixes the following issue: ACPI Error: Mutex [0x0] is not acquired, cannot release (20141107/utmutex-322) Call Trace: [<ffffffff81b0bd28>] dump_stack+0x4f/0x7b [<ffffffff81546bfc>] acpi_ut_release_mutex+0x47/0x67 [<ffffffff81542cf1>] acpi_tb_delete_namespace_by_owner+0x57/0x8d [<ffffffff81543ef1>] acpi_unload_table_id+0x3a/0x5e Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r--drivers/acpi/acpica/tbxface.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c
index 6482b0ded652..9520ae19bb37 100644
--- a/drivers/acpi/acpica/tbxface.c
+++ b/drivers/acpi/acpica/tbxface.c
@@ -281,6 +281,11 @@ acpi_status acpi_unload_table_id(acpi_owner_id id)
281 281
282 ACPI_FUNCTION_TRACE(acpi_unload_table_id); 282 ACPI_FUNCTION_TRACE(acpi_unload_table_id);
283 283
284 status = acpi_ut_acquire_mutex(ACPI_MTX_INTERPRETER);
285 if (ACPI_FAILURE(status)) {
286 return_ACPI_STATUS(status);
287 }
288
284 /* Find table in the global table list */ 289 /* Find table in the global table list */
285 for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) { 290 for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
286 if (id != acpi_gbl_root_table_list.tables[i].owner_id) { 291 if (id != acpi_gbl_root_table_list.tables[i].owner_id) {
@@ -297,6 +302,8 @@ acpi_status acpi_unload_table_id(acpi_owner_id id)
297 acpi_tb_set_table_loaded_flag(i, FALSE); 302 acpi_tb_set_table_loaded_flag(i, FALSE);
298 break; 303 break;
299 } 304 }
305
306 (void)acpi_ut_release_mutex(ACPI_MTX_INTERPRETER);
300 return_ACPI_STATUS(status); 307 return_ACPI_STATUS(status);
301} 308}
302 309