watchdog: fix double lock in watchdog_nmi_enable_all

Commit ab992dc38f ("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 <[email protected]>
Duh-by: Peter Zijlstra <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Michal Hocko 2015-05-19 09:07:27 +02:00 • committed by Linus Torvalds
commit 1173ff09b9

View file

@ -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)