Skip to content

Commit 9360d03

Browse files
committed
panic: Separate sysctl logic from CONFIG_SMP
In preparation for adding more sysctls directly in kernel/panic.c, split CONFIG_SMP from the logic that adds sysctls. Cc: Petr Mladek <pmladek@suse.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: tangmeng <tangmeng@uniontech.com> Cc: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Cc: Tiezhu Yang <yangtiezhu@loongson.cn> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20221117234328.594699-1-keescook@chromium.org
1 parent 25226df commit 9360d03

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

kernel/panic.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ ATOMIC_NOTIFIER_HEAD(panic_notifier_list);
7575

7676
EXPORT_SYMBOL(panic_notifier_list);
7777

78-
#if defined(CONFIG_SMP) && defined(CONFIG_SYSCTL)
78+
#ifdef CONFIG_SYSCTL
7979
static struct ctl_table kern_panic_table[] = {
80+
#ifdef CONFIG_SMP
8081
{
8182
.procname = "oops_all_cpu_backtrace",
8283
.data = &sysctl_oops_all_cpu_backtrace,
@@ -86,6 +87,7 @@ static struct ctl_table kern_panic_table[] = {
8687
.extra1 = SYSCTL_ZERO,
8788
.extra2 = SYSCTL_ONE,
8889
},
90+
#endif
8991
{ }
9092
};
9193

0 commit comments

Comments
 (0)