提交 7838d5fd 编写于 作者: J Jingxian He 提交者: Zheng Zengkai

mm/pin_mem: add invalid check for pinmemory boot parameter

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: NJingxian He <hejingxian@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 a27c2643
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册