aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/init/main.c b/init/main.c
index 9c51ee7adf3d..03b408dff825 100644
--- a/init/main.c
+++ b/init/main.c
@@ -209,8 +209,19 @@ early_param("quiet", quiet_kernel);
209 209
210static int __init loglevel(char *str) 210static int __init loglevel(char *str)
211{ 211{
212 get_option(&str, &console_loglevel); 212 int newlevel;
213 return 0; 213
214 /*
215 * Only update loglevel value when a correct setting was passed,
216 * to prevent blind crashes (when loglevel being set to 0) that
217 * are quite hard to debug
218 */
219 if (get_option(&str, &newlevel)) {
220 console_loglevel = newlevel;
221 return 0;
222 }
223
224 return -EINVAL;
214} 225}
215 226
216early_param("loglevel", loglevel); 227early_param("loglevel", loglevel);
@@ -370,9 +381,6 @@ static noinline void __init_refok rest_init(void)
370 preempt_enable_no_resched(); 381 preempt_enable_no_resched();
371 schedule(); 382 schedule();
372 383
373 /* At this point, we can enable user mode helper functionality */
374 usermodehelper_enable();
375
376 /* Call into cpu_idle with preempt disabled */ 384 /* Call into cpu_idle with preempt disabled */
377 preempt_disable(); 385 preempt_disable();
378 cpu_idle(); 386 cpu_idle();
@@ -722,6 +730,7 @@ static void __init do_basic_setup(void)
722 driver_init(); 730 driver_init();
723 init_irq_proc(); 731 init_irq_proc();
724 do_ctors(); 732 do_ctors();
733 usermodehelper_enable();
725 do_initcalls(); 734 do_initcalls();
726} 735}
727 736