]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - init/main.c
net: check return value for dst_alloc
[karo-tx-linux.git] / init / main.c
index 1952d37e4ecbd7548a24f247a983bbd0f97051ce..2a9b88aa5e7601f83031ed5623dbbb25742dad30 100644 (file)
@@ -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);
@@ -369,9 +380,12 @@ static noinline void __init_refok rest_init(void)
        init_idle_bootup_task(current);
        preempt_enable_no_resched();
        schedule();
-       preempt_disable();
+
+       /* At this point, we can enable user mode helper functionality */
+       usermodehelper_enable();
 
        /* Call into cpu_idle with preempt disabled */
+       preempt_disable();
        cpu_idle();
 }