The patch titled Subject: drivers/platform/x86/thinkpad_acpi.c: move hotkey_thread_mutex lock after set_freezable() has been added to the -mm tree. Its filename is drivers-platform-x86-thinkpad_acpic-move-hotkey_thread_mutex-lock-after-set_freezable.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Artem Savkov <artem.savkov@xxxxxxxxx> Subject: drivers/platform/x86/thinkpad_acpi.c: move hotkey_thread_mutex lock after set_freezable() set_freezable() runs try_to_freeze() 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@xxxxxxxxx> Cc: Henrique de Moraes Holschuh <ibm-acpi@xxxxxxxxxx> Cc: Matthew Garrett <matthew.garrett@xxxxxxxxxx> Cc: "Rafael J. Wysocki" <rjw@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/platform/x86/thinkpad_acpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -puN drivers/platform/x86/thinkpad_acpi.c~drivers-platform-x86-thinkpad_acpic-move-hotkey_thread_mutex-lock-after-set_freezable drivers/platform/x86/thinkpad_acpi.c --- a/drivers/platform/x86/thinkpad_acpi.c~drivers-platform-x86-thinkpad_acpic-move-hotkey_thread_mutex-lock-after-set_freezable +++ a/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; } _ Patches currently in -mm which might be from artem.savkov@xxxxxxxxx are drivers-platform-x86-thinkpad_acpic-move-hotkey_thread_mutex-lock-after-set_freezable.patch drm-convert-to-idr_alloc-fix.patch drm-convert-to-idr_alloc-fix-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html