Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264021
b: refs/heads/master
c: 808bf29
h: refs/heads/master
i:
  264019: 8bcb61e
v: v3
  • Loading branch information
Alexander Sverdlin authored and Linus Torvalds committed Sep 21, 2011
1 parent b8904c0 commit e7d9214
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 32ef43848f283e0ef945d3c67e851c143fea3970
refs/heads/master: 808bf29b9195c52239b9aaeda7c6082a0ddf07c6
15 changes: 13 additions & 2 deletions trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,19 @@ early_param("quiet", quiet_kernel);

static int __init loglevel(char *str)
{
get_option(&str, &console_loglevel);
return 0;
int newlevel;

/*
* Only update loglevel value when a correct setting was passed,
* to prevent blind crashes (when loglevel being set to 0) that
* are quite hard to debug
*/
if (get_option(&str, &newlevel)) {
console_loglevel = newlevel;
return 0;
}

return -EINVAL;
}

early_param("loglevel", loglevel);
Expand Down

0 comments on commit e7d9214

Please sign in to comment.