From: Michal Hocko Date: Tue, 19 May 2015 07:07:27 +0000 (+0200) Subject: watchdog: fix double lock in watchdog_nmi_enable_all X-Git-Tag: v4.1-rc5~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1173ff09b9c57be8248427b7be161f7599dccd6b;p=platform%2Fkernel%2Flinux-exynos.git 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 Duh-by: Peter Zijlstra Signed-off-by: Linus Torvalds --- diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 506edcc5..581a68a 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)