Commit a6572f84 authored by Li Zefan's avatar Li Zefan Committed by Ingo Molnar

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: default avatarLi Zefan <lizefan@huawei.com>
Acked-by: default avatarDon Zickus <dzickus@redhat.com>
Link: http://lkml.kernel.org/r/51959668.9040106@huawei.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 1b45adcd
...@@ -120,7 +120,6 @@ extern int blk_iopoll_enabled; ...@@ -120,7 +120,6 @@ extern int blk_iopoll_enabled;
/* Constants used for minimum and maximum */ /* Constants used for minimum and maximum */
#ifdef CONFIG_LOCKUP_DETECTOR #ifdef CONFIG_LOCKUP_DETECTOR
static int sixty = 60; static int sixty = 60;
static int neg_one = -1;
#endif #endif
static int zero; static int zero;
...@@ -814,7 +813,7 @@ static struct ctl_table kern_table[] = { ...@@ -814,7 +813,7 @@ static struct ctl_table kern_table[] = {
.maxlen = sizeof(int), .maxlen = sizeof(int),
.mode = 0644, .mode = 0644,
.proc_handler = proc_dowatchdog, .proc_handler = proc_dowatchdog,
.extra1 = &neg_one, .extra1 = &zero,
.extra2 = &sixty, .extra2 = &sixty,
}, },
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment