Browse Source

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux

Pull kernel argument parsing fix from Rusty Russell:
 "Nasty, stupid bug, and I've suddenly had two reports"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
  param: fix crash on bad kernel arguments
Linus Torvalds 10 years ago
parent
commit
9d1f9c73df
1 changed files with 1 additions and 1 deletions
  1. 1 1
      init/main.c

+ 1 - 1
init/main.c

@@ -544,7 +544,7 @@ asmlinkage __visible void __init start_kernel(void)
 				  static_command_line, __start___param,
 				  static_command_line, __start___param,
 				  __stop___param - __start___param,
 				  __stop___param - __start___param,
 				  -1, -1, &unknown_bootoption);
 				  -1, -1, &unknown_bootoption);
-	if (after_dashes)
+	if (!IS_ERR_OR_NULL(after_dashes))
 		parse_args("Setting init args", after_dashes, NULL, 0, -1, -1,
 		parse_args("Setting init args", after_dashes, NULL, 0, -1, -1,
 			   set_init_arg);
 			   set_init_arg);