Skip to content

Commit

Permalink
watchdog: Don't change watchdog state on read of sysctl
Browse files Browse the repository at this point in the history
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>
Cc: <stable@kernel.org>
LKML-Reference: <1296230433-6261-3-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Marcin Slusarz authored and Ingo Molnar committed Jan 31, 2011
1 parent 3973576 commit 9ffdc6c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions kernel/watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,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;
}

Expand Down

0 comments on commit 9ffdc6c

Please sign in to comment.