diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2011-01-28 11:00:33 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 15:14:45 -0800 |
commit | 1ac0a5efc2227ca74f36c4e7d2f166a8e0469216 (patch) | |
tree | 3fd1b6f160693eafee43bedbffa5b05bf837d1b8 /kernel | |
parent | a716ed74c75843f5e15c1cf2dedd6de8a882bd9c (diff) |
watchdog: Don't change watchdog state on read of sysctl
commit 9ffdc6c37df131f89d52001e0ef03091b158826f upstream.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
[ add {}'s to fix a warning ]
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1296230433-6261-3-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/watchdog.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index b4560a8480c..2886c0388f9 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -497,10 +497,12 @@ int proc_dowatchdog_enabled(struct ctl_table *table, int write, { proc_dointvec(table, write, buffer, length, ppos); - if (watchdog_enabled) - watchdog_enable_all_cpus(); - else - watchdog_disable_all_cpus(); + if (write) { + if (watchdog_enabled) + watchdog_enable_all_cpus(); + else + watchdog_disable_all_cpus(); + } return 0; } |