diff options
author | Li Zefan <lizefan@huawei.com> | 2013-05-16 22:31:04 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-05-28 05:28:18 -0400 |
commit | a6572f84c5b135d9b6df279ed3c8de028bd1edd9 (patch) | |
tree | 8555a23db262d55512bf1fc365c5be8ede427f10 /kernel/sysctl.c | |
parent | 1b45adcd9a503428e6de6b39bc6892d86c9c1d41 (diff) |
watchdog: Disallow setting watchdog_thresh to -1
In old kernels, it's allowed to set softlockup_thresh to -1 or 0
to disable softlockup detection. However watchdog_thresh only
uses 0 to disable detection, and setting it to -1 just froze my
box and nothing I can do but reboot.
Signed-off-by: Li Zefan <lizefan@huawei.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Link: http://lkml.kernel.org/r/51959668.9040106@huawei.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 9edcf456e0fc..b0a1f99907f3 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -120,7 +120,6 @@ extern int blk_iopoll_enabled; | |||
120 | /* Constants used for minimum and maximum */ | 120 | /* Constants used for minimum and maximum */ |
121 | #ifdef CONFIG_LOCKUP_DETECTOR | 121 | #ifdef CONFIG_LOCKUP_DETECTOR |
122 | static int sixty = 60; | 122 | static int sixty = 60; |
123 | static int neg_one = -1; | ||
124 | #endif | 123 | #endif |
125 | 124 | ||
126 | static int zero; | 125 | static int zero; |
@@ -814,7 +813,7 @@ static struct ctl_table kern_table[] = { | |||
814 | .maxlen = sizeof(int), | 813 | .maxlen = sizeof(int), |
815 | .mode = 0644, | 814 | .mode = 0644, |
816 | .proc_handler = proc_dowatchdog, | 815 | .proc_handler = proc_dowatchdog, |
817 | .extra1 = &neg_one, | 816 | .extra1 = &zero, |
818 | .extra2 = &sixty, | 817 | .extra2 = &sixty, |
819 | }, | 818 | }, |
820 | { | 819 | { |