aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/watchdog.c
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.cz>2015-05-19 03:07:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-19 13:57:03 -0400
commit1173ff09b9c57be8248427b7be161f7599dccd6b (patch)
tree2c6b5593ae16580db22cef26585f743b8fe6f02c /kernel/watchdog.c
parente26081808edadfd257c6c9d81014e3b25e9a6118 (diff)
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>
Diffstat (limited to 'kernel/watchdog.c')
-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)
621 put_online_cpus(); 621 put_online_cpus();
622 622
623unlock: 623unlock:
624 mutex_lock(&watchdog_proc_mutex); 624 mutex_unlock(&watchdog_proc_mutex);
625} 625}
626 626
627void watchdog_nmi_disable_all(void) 627void watchdog_nmi_disable_all(void)