浏览代码

x86: smpboot maxcpus - add checking for NULL early param

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: akpm@linux-foundation.org
Cc: andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cyrill Gorcunov 17 年之前
父节点
当前提交
4d8cc874d7
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      arch/x86/kernel/smpboot.c

+ 2 - 1
arch/x86/kernel/smpboot.c

@@ -1452,7 +1452,8 @@ static int __init parse_maxcpus(char *arg)
 {
 	extern unsigned int maxcpus;
 
-	maxcpus = simple_strtoul(arg, NULL, 0);
+	if (arg)
+		maxcpus = simple_strtoul(arg, NULL, 0);
 	return 0;
 }
 early_param("maxcpus", parse_maxcpus);