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 <[email protected]> Cc: Andrew Morton <[email protected]> Cc: tangmeng <[email protected]> Cc: "Guilherme G. Piccoli" <[email protected]> Cc: Tiezhu Yang <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Reviewed-by: Luis Chamberlain <[email protected]> Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 25226df commit 9360d03

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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)