提交 a934c00c 编写于 作者: C Chen Zhongjin 提交者: Zheng Zengkai

smp: fix early_param csdlock_debug boot panic

maillist inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5EU5D
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=44f2910f800ba58c2276cd96e69c456378e6212a

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

csdlock_debug is a early_param to enable csd_lock_wait feature.

It uses static_branch_enable to control which triggers a bug on
booting time. In early_param stage static_branch_enable will call
__page_to_pfn before sparse_init.

This causes panic when CONFIG_SPARSEMEM_VMEMMAP=n on arm64, so
change early_param to __setup to avoid the problem.
Reported-by: NChen jingwen <chenjingwen6@huawei.com>
Signed-off-by: NChen Zhongjin <chenzhongjin@huawei.com>
Reviewed-by: NXu Kuohai <xukuohai@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 11711fef
...@@ -113,9 +113,9 @@ static int __init csdlock_debug(char *str) ...@@ -113,9 +113,9 @@ static int __init csdlock_debug(char *str)
if (val) if (val)
static_branch_enable(&csdlock_debug_enabled); static_branch_enable(&csdlock_debug_enabled);
return 0; return 1;
} }
early_param("csdlock_debug", csdlock_debug); __setup("csdlock_debug=", csdlock_debug);
static DEFINE_PER_CPU(call_single_data_t *, cur_csd); static DEFINE_PER_CPU(call_single_data_t *, cur_csd);
static DEFINE_PER_CPU(smp_call_func_t, cur_csd_func); static DEFINE_PER_CPU(smp_call_func_t, cur_csd_func);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册