summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.cz>2015-05-19 09:07:27 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-19 19:57:03 +0200
commit1173ff09b9c57be8248427b7be161f7599dccd6b (patch)
tree2c6b5593ae16580db22cef26585f743b8fe6f02c
parentLinux 4.1-rc4 (diff)
downloadlinux-1173ff09b9c57be8248427b7be161f7599dccd6b.tar.xz
linux-1173ff09b9c57be8248427b7be161f7599dccd6b.zip
watchdog: fix double lock in watchdog_nmi_enable_all
Commit ab992dc38f9a ("watchdog: Fix merge 'conflict'") has introduced an obvious deadlock because of a typo. watchdog_proc_mutex should be unlocked on exit. Thanks to Miroslav Benes who was staring at the code with me and noticed this. Signed-off-by: Michal Hocko <mhocko@suse.cz> Duh-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--kernel/watchdog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 506edcc500c4..581a68a04c64 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -621,7 +621,7 @@ void watchdog_nmi_enable_all(void)
put_online_cpus();
unlock:
- mutex_lock(&watchdog_proc_mutex);
+ mutex_unlock(&watchdog_proc_mutex);
}
void watchdog_nmi_disable_all(void)