]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: Avoid kernel crash when disabling watchdog
authorStephane Eranian <eranian@google.com>
Tue, 14 Sep 2010 13:34:01 +0000 (15:34 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 15 Sep 2010 08:43:58 +0000 (10:43 +0200)
commitabf6c2cde0cafc99a75690b062c3f4ef837b15cc
treea6200b56afa330bf2b4b61d2485c44362a0f0c80
parentd4c9cacb4200b26d7504a2fba9811ce063e7a584
watchdog: Avoid kernel crash when disabling watchdog

In case you boot with the watchdog disabled, i.e., nowatchdog, then,
if you try to disable it via /proc/sys/kernel/watchdog, you get
a kernel crash. The reason is that you are trying to cancel a hrtimer
which has never been initialized.

This patch fixes this by skipping execution of
watchdog_disable_all_cpus() when the watchdog is marked
disabled from boot.

Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <4c8f7a23.cae9d80a.2c11.0bb4@mx.google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/watchdog.c