[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1361697722-4575-1-git-send-email-artem.savkov@gmail.com>
Date: Sun, 24 Feb 2013 13:22:02 +0400
From: Artem Savkov <artem.savkov@...il.com>
To: ibm-acpi-devel@...ts.sourceforge.net
Cc: platform-driver-x86@...r.kernel.org, ibm-acpi@....eng.br,
matthew.garrett@...ula.com, linux-kernel@...r.kernel.org,
Artem Savkov <artem.savkov@...il.com>
Subject: [PATCH] thinkpad_acpi: moved hotkey_thread_mutex lock after set_freezable()
set_freezable() checks freezing during which no locks should be held.
hotkey_thread_mutex lock should be moved closer to where it is actually needed.
Signed-off-by: Artem Savkov <artem.savkov@...il.com>
---
drivers/platform/x86/thinkpad_acpi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 22d8936..ffed96cd 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2463,13 +2463,13 @@ static int hotkey_kthread(void *data)
unsigned int poll_freq;
bool was_frozen;
- mutex_lock(&hotkey_thread_mutex);
-
if (tpacpi_lifecycle == TPACPI_LIFE_EXITING)
goto exit;
set_freezable();
+ mutex_lock(&hotkey_thread_mutex);
+
so = 0;
si = 1;
t = 0;
@@ -2523,8 +2523,8 @@ static int hotkey_kthread(void *data)
si ^= 1;
}
-exit:
mutex_unlock(&hotkey_thread_mutex);
+exit:
return 0;
}
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists