Skip to content

Commit 1173ff0

Browse files
Michal Hockotorvalds
authored andcommitted
watchdog: fix double lock in watchdog_nmi_enable_all
Commit ab992dc ("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]>
1 parent e260818 commit 1173ff0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/watchdog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ void watchdog_nmi_enable_all(void)
621621
put_online_cpus();
622622

623623
unlock:
624-
mutex_lock(&watchdog_proc_mutex);
624+
mutex_unlock(&watchdog_proc_mutex);
625625
}
626626

627627
void watchdog_nmi_disable_all(void)

0 commit comments

Comments
 (0)