summaryrefslogtreecommitdiffstats
path: root/kernel/softlockup.c
diff options
context:
space:
mode:
authorMandeep Singh Baines <msb@google.com>2009-01-12 21:15:17 -0800
committerIngo Molnar <mingo@elte.hu>2009-01-14 11:48:07 +0100
commitbaf48f6577e581a9adb8fe849dc80e24b21d171d (patch)
tree279e54b7374a9c52025ded4f9bb718e5382b0340 /kernel/softlockup.c
parente4fa4c97016037620f9dc8bafe03e1086b665b4c (diff)
softlock: fix false panic which can occur if softlockup_thresh is reduced
At run-time, if softlockup_thresh is changed to a much lower value, touch_timestamp is likely to be much older than the new softlock_thresh. This will cause a false softlockup to be detected. If softlockup_panic is enabled, the system will panic. The fix is to touch all watchdogs before changing softlockup_thresh. Signed-off-by: Mandeep Singh Baines <msb@google.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/softlockup.c')
-rw-r--r--kernel/softlockup.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index d9188c66278..85d5a245510 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -16,6 +16,7 @@
#include <linux/lockdep.h>
#include <linux/notifier.h>
#include <linux/module.h>
+#include <linux/sysctl.h>
#include <asm/irq_regs.h>
@@ -88,6 +89,14 @@ void touch_all_softlockup_watchdogs(void)
}
EXPORT_SYMBOL(touch_all_softlockup_watchdogs);
+int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
+ struct file *filp, void __user *buffer,
+ size_t *lenp, loff_t *ppos)
+{
+ touch_all_softlockup_watchdogs();
+ return proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos);
+}
+
/*
* This callback runs from the timer interrupt, and checks
* whether the watchdog thread has hung or not: