From: Joel Granados Date: Thu, 8 May 2025 19:35:27 +0000 (+0200) Subject: sysctl: Move sysctl_panic_on_stackoverflow to kernel/panic.c X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5a477e934152d0b32201000444d7a5e8358c9480;p=users%2Fjedix%2Flinux-maple.git sysctl: Move sysctl_panic_on_stackoverflow to kernel/panic.c This is part of a greater effort to move ctl tables into their respective subsystems which will reduce the merge conflicts in kernel/sysctl.c. Reviewed-by: Kees Cook Signed-off-by: Joel Granados --- diff --git a/kernel/panic.c b/kernel/panic.c index 39e5b1ddf1a82..64e58835086d6 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -183,6 +183,16 @@ static const struct ctl_table kern_panic_table[] = { .mode = 0644, .proc_handler = proc_douintvec, }, +#if (defined(CONFIG_X86_32) || defined(CONFIG_PARISC)) && \ + defined(CONFIG_DEBUG_STACKOVERFLOW) + { + .procname = "panic_on_stackoverflow", + .data = &sysctl_panic_on_stackoverflow, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec, + }, +#endif }; static __init int kernel_panic_sysctls_init(void) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index d5bebdd02cd4f..446d77ec44f57 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -1552,16 +1552,6 @@ static const struct ctl_table kern_table[] = { .mode = 0444, .proc_handler = proc_dointvec, }, -#if (defined(CONFIG_X86_32) || defined(CONFIG_PARISC)) && \ - defined(CONFIG_DEBUG_STACKOVERFLOW) - { - .procname = "panic_on_stackoverflow", - .data = &sysctl_panic_on_stackoverflow, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = proc_dointvec, - }, -#endif #ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN { .procname = "ignore-unaligned-usertrap",