|
@@ -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);
|