提交 13687b32 编写于 作者: K Kees Cook 提交者: sanglipeng

panic: Separate sysctl logic from CONFIG_SMP

stable inclusion
from stable-v5.10.166
commit 191a3b17dd9b55dc92283935247f8a854e6fffba
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7TH9O

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=191a3b17dd9b55dc92283935247f8a854e6fffba

--------------------------------

commit 9360d035 upstream.

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: NLuis Chamberlain <mcgrof@kernel.org>
Signed-off-by: NKees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20221117234328.594699-1-keescook@chromium.orgSigned-off-by: NEric Biggers <ebiggers@google.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
上级 3bd8e946
...@@ -72,8 +72,9 @@ ATOMIC_NOTIFIER_HEAD(panic_notifier_list); ...@@ -72,8 +72,9 @@ ATOMIC_NOTIFIER_HEAD(panic_notifier_list);
EXPORT_SYMBOL(panic_notifier_list); EXPORT_SYMBOL(panic_notifier_list);
#if defined(CONFIG_SMP) && defined(CONFIG_SYSCTL) #ifdef CONFIG_SYSCTL
static struct ctl_table kern_panic_table[] = { static struct ctl_table kern_panic_table[] = {
#ifdef CONFIG_SMP
{ {
.procname = "oops_all_cpu_backtrace", .procname = "oops_all_cpu_backtrace",
.data = &sysctl_oops_all_cpu_backtrace, .data = &sysctl_oops_all_cpu_backtrace,
...@@ -83,6 +84,7 @@ static struct ctl_table kern_panic_table[] = { ...@@ -83,6 +84,7 @@ static struct ctl_table kern_panic_table[] = {
.extra1 = SYSCTL_ZERO, .extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE, .extra2 = SYSCTL_ONE,
}, },
#endif
{ } { }
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册