watchdog: Fix broken nowatchdog logic
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Fri, 28 Jan 2011 16:00:31 +0000 (11:00 -0500)
committerIngo Molnar <mingo@elte.hu>
Mon, 31 Jan 2011 12:22:42 +0000 (13:22 +0100)
commit4135038a582c20ffdadfcf6564852e0b72a20968
tree2b67aec9d8057ae394fd1b4e0989674b47a9d45c
parentd038b12c6d773a4b9f69ca5243773bf6314f7ee9
watchdog: Fix broken nowatchdog logic

Passing nowatchdog to kernel disables 2 things: creation of
watchdog threads AND initialization of percpu watchdog_hrtimer.
As hrtimers are initialized only at boot it's not possible to
enable watchdog later - for me all watchdog threads started to
eat 100% of CPU time, but they could just crash.

Additionally, even if these threads would start properly,
watchdog_disable_all_cpus was guarded by no_watchdog check, so
you couldn't disable watchdog.

To fix this, remove no_watchdog variable and use already
existing watchdog_enabled variable.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
[ removed another no_watchdog instance ]
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: <stable@kernel.org>
LKML-Reference: <1296230433-6261-1-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/watchdog.c