From: Chen Zhongjin chenzhongjin@huawei.com
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/?...
--------------------------------
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: Chen jingwen chenjingwen6@huawei.com Signed-off-by: Chen Zhongjin chenzhongjin@huawei.com Reviewed-by: Xu Kuohai xukuohai@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- kernel/smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/smp.c b/kernel/smp.c index b04ab01eb9e0..7cb03edf1735 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -113,9 +113,9 @@ static int __init csdlock_debug(char *str) if (val) 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(smp_call_func_t, cur_csd_func);