فهرست منبع

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;
 	extern unsigned int maxcpus;
 
 
-	maxcpus = simple_strtoul(arg, NULL, 0);
+	if (arg)
+		maxcpus = simple_strtoul(arg, NULL, 0);
 	return 0;
 	return 0;
 }
 }
 early_param("maxcpus", parse_maxcpus);
 early_param("maxcpus", parse_maxcpus);