From: Jingxian He hejingxian@huawei.com
euleros inclusion category: feature bugzilla:https://gitee.com/openeuler/kernel/issues/I4UCEQ CVE: NA
------------ When the pinmemory setting string is null, return directly without setting pinmemory addr.
Signed-off-by: Jingxian He hejingxian@huawei.com Reviewed-by: Kefeng Wang wangkefeng.wang@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- mm/pin_mem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/mm/pin_mem.c b/mm/pin_mem.c index 34fe373c5fcc..d37938bcdc97 100644 --- a/mm/pin_mem.c +++ b/mm/pin_mem.c @@ -1092,9 +1092,12 @@ static int __init parse_pin_memory(char *cmdline) { char *cur = cmdline;
+ if (!cmdline) + return 0; + pin_mem_len = memparse(cmdline, &cur); if (cmdline == cur) { - pr_warn("crashkernel: memory value expected\n"); + pr_warn("pinmem: memory value expected\n"); return -EINVAL; }