diff options
author | John Stultz <john.stultz@linaro.org> | 2011-10-10 12:09:34 -0700 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2011-10-10 12:09:34 -0700 |
commit | 8164d79251890b97621595f23c6ea850d46eed0d (patch) | |
tree | 135f6748045e635f75b68059d5a6d3f55635dac8 /init | |
parent | 730f3f42174d9f58537d86eac1bec0c092766ae4 (diff) | |
parent | 65112dccf8a113737684366349d7f9ec373ddc47 (diff) |
Merge branch 'upstream/linaro-3.1' into linaro-android-3.1-fport
Diffstat (limited to 'init')
-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 9c51ee7adf3..03b408dff82 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(); } |