diff options
author | Krister Johansen <kjlx@templeofstupid.com> | 2023-10-27 23:46:53 +0200 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2023-11-01 20:10:02 +0100 |
commit | 8b793bcda61f6c3ed4f5b2ded7530ef6749580cb (patch) | |
tree | 36f65aa933d41897d98632de10c590881d3e6f67 /kernel/watchdog.c | |
parent | proc: sysctl: prevent aliased sysctls from getting passed to init (diff) | |
download | linux-8b793bcda61f6c3ed4f5b2ded7530ef6749580cb.tar.xz linux-8b793bcda61f6c3ed4f5b2ded7530ef6749580cb.zip |
watchdog: move softlockup_panic back to early_param
Setting softlockup_panic from do_sysctl_args() causes it to take effect
later in boot. The lockup detector is enabled before SMP is brought
online, but do_sysctl_args runs afterwards. If a user wants to set
softlockup_panic on boot and have it trigger should a softlockup occur
during onlining of the non-boot processors, they could do this prior to
commit f117955a2255 ("kernel/watchdog.c: convert {soft/hard}lockup boot
parameters to sysctl aliases"). However, after this commit the value
of softlockup_panic is set too late to be of help for this type of
problem. Restore the prior behavior.
Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
Cc: stable@vger.kernel.org
Fixes: f117955a2255 ("kernel/watchdog.c: convert {soft/hard}lockup boot parameters to sysctl aliases")
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r-- | kernel/watchdog.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c index d145305d95fe..5cd6d4e26915 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -283,6 +283,13 @@ static DEFINE_PER_CPU(struct hrtimer, watchdog_hrtimer); static DEFINE_PER_CPU(bool, softlockup_touch_sync); static unsigned long soft_lockup_nmi_warn; +static int __init softlockup_panic_setup(char *str) +{ + softlockup_panic = simple_strtoul(str, NULL, 0); + return 1; +} +__setup("softlockup_panic=", softlockup_panic_setup); + static int __init nowatchdog_setup(char *str) { watchdog_user_enabled = 0; |