Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

watchdog: move nmi_watchdog sysctl into .rodata

Move nmi_watchdog into the watchdog_sysctls array to prevent it from
unnecessary modification. This move effectively moves it inside the
.rodata section.

Initially moved out into its own non-const array in commit 9ec272c586b0
("watchdog/hardlockup: keep kernel.nmi_watchdog sysctl as 0444 if probe
fails"), which made it writable only when watchdog_hardlockup_available
was true. Moving it back to watchdog_sysctl keeps this behavior as
writing to nmi_watchdog still fails when watchdog_hardlockup_available
is false.

Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Joel Granados <joel.granados@kernel.org>

+1 -8
+1 -8
kernel/watchdog.c
··· 1231 1231 }, 1232 1232 #endif /* CONFIG_SMP */ 1233 1233 #endif 1234 - }; 1235 - 1236 - static struct ctl_table watchdog_hardlockup_sysctl[] = { 1237 1234 { 1238 1235 .procname = "nmi_watchdog", 1239 1236 .data = &watchdog_hardlockup_user_enabled, 1240 1237 .maxlen = sizeof(int), 1241 - .mode = 0444, 1238 + .mode = 0644, 1242 1239 .proc_handler = proc_nmi_watchdog, 1243 1240 .extra1 = SYSCTL_ZERO, 1244 1241 .extra2 = SYSCTL_ONE, ··· 1245 1248 static void __init watchdog_sysctl_init(void) 1246 1249 { 1247 1250 register_sysctl_init("kernel", watchdog_sysctls); 1248 - 1249 - if (watchdog_hardlockup_available) 1250 - watchdog_hardlockup_sysctl[0].mode = 0644; 1251 - register_sysctl_init("kernel", watchdog_hardlockup_sysctl); 1252 1251 } 1253 1252 1254 1253 #else