diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2011-10-05 10:52:27 -0600 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2011-10-05 10:52:27 -0600 |
| commit | 9514a56753a8d379db36bed424588e1842f2bfcc (patch) | |
| tree | d13cdfcd9473f521c3b108770dba57e81e557a30 /init/main.c | |
| parent | 4cd7f7a31178ff8a15ad2bc1258b9b2bf2cf51a4 (diff) | |
| parent | 6add6967a4a57e2156b96e62f28bcbe1901d16c1 (diff) | |
Merge branch 'for-grant' of git://git.jdl.com/software/linux-3.0 into devicetree/next
Diffstat (limited to 'init/main.c')
| -rw-r--r-- | init/main.c | 19 |
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); 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); @@ -370,9 +381,6 @@ static noinline void __init_refok rest_init(void) preempt_enable_no_resched(); schedule(); - /* At this point, we can enable user mode helper functionality */ - usermodehelper_enable(); - /* Call into cpu_idle with preempt disabled */ preempt_disable(); cpu_idle(); @@ -722,6 +730,7 @@ static void __init do_basic_setup(void) driver_init(); init_irq_proc(); do_ctors(); + usermodehelper_enable(); do_initcalls(); } |
