Patchwork MAC firmware does not load due to (commit 288d5abe usermodehelper)

login
register
mail settings
Submitter Linus Torvalds
Date Sept. 28, 2011, 3:21 p.m.
Message ID <CA+55aFy4aZPdUNBR0O3SP1iRRJyeF9kPZxH9G_eYdxueYskF4g@mail.gmail.com>
Download mbox | patch
Permalink /patch/116820/
State New
Headers show

Comments

Linus Torvalds - Sept. 28, 2011, 3:21 p.m.
On Wed, Sep 28, 2011 at 5:06 AM, Richard Cochran
<richardcochran@gmail.com> wrote:
>
> A warning appears on the console, shown below.  I don't know what
> commit 288d5abe was trying to fix, but it sure made a regression for
> me. It probably would also spoil using NFS boot, too.
>
> Any ideas what to do about this?

Something seems to be calling ioctl() befor rest_init() has even
completed. Which sounds odd, but I wonder if the schedule() there
before it might have let 'init' get going.

Does something like the attached (UNTESTED) fix it?

                             Linus
Richard Cochran - Sept. 28, 2011, 5:11 p.m.
On Wed, Sep 28, 2011 at 08:21:05AM -0700, Linus Torvalds wrote:
> 
> Something seems to be calling ioctl() befor rest_init() has even
> completed. Which sounds odd, but I wonder if the schedule() there
> before it might have let 'init' get going.

It does look like it. The init is busybox, and the startup script does
mount, syslogd, and then ifup, so that all can go by quickly.

> Does something like the attached (UNTESTED) fix it?

Yup, problem cured.

Thanks,
Richard

Patch

 init/main.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/init/main.c b/init/main.c
index 2a9b88aa5e76..23702bbdbc1d 100644
--- a/init/main.c
+++ b/init/main.c
@@ -381,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();
@@ -734,6 +731,7 @@  static void __init do_basic_setup(void)
 	init_irq_proc();
 	do_ctors();
 	do_initcalls();
+	usermodehelper_enable();
 }
 
 static void __init do_pre_smp_initcalls(void)