]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
watchdog: move nmi_watchdog sysctl into .rodata
authorJoel Granados <joel.granados@kernel.org>
Mon, 29 Sep 2025 12:43:54 +0000 (14:43 +0200)
committerJoel Granados <joel.granados@kernel.org>
Fri, 24 Oct 2025 13:35:11 +0000 (15:35 +0200)
commit18c4e028847092003c11f824796d1309bc01cd69
tree64c0629cf96df4de6deddc6f7aaff3db6c994590
parent3a8660878839faadb4f1a6dd72c3179c1df56787
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>
kernel/watchdog.c