浏览代码

x86: idle process - 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 年之前
父节点
当前提交
ab6bc3e343
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      arch/x86/kernel/process.c

+ 3 - 0
arch/x86/kernel/process.c

@@ -164,6 +164,9 @@ void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c)
 
 static int __init idle_setup(char *str)
 {
+	if (!str)
+		return -EINVAL;
+
 	if (!strcmp(str, "poll")) {
 		printk("using polling idle threads.\n");
 		pm_idle = poll_idle;