Re: [PATCH 2/2] module: fix bne2 "gave up waiting for init of module libcrc32c"

From: Rusty Russell
Date: Wed Jun 02 2010 - 01:53:08 EST


On Wed, 2 Jun 2010 02:05:10 pm Linus Torvalds wrote:
>
> On Tue, 1 Jun 2010, Brandon Philips wrote:
> >
> > FWIW, I tried this same idea initially and it breaks because the
> > kobject EEXIST is coming from mod_sysfs_init() which happens further
> > up in load_module() before the list_add_rcu().
>
> Ahh, right. So we'd need to mvoe that down too. As Rusty says, the kobject
> EEXIST warning should be fairly harmless - albeit annoying. Do things
> actually _work_ with that thing apart from the kobject warning?
>
> > I also tried the obvious variation of moving the list_add_rcu() up
> > to where the find_module is but got:
>
> Yeah, I don't think moving it up will work, because then the module symbol
> resolver will see itself before having set up the symbols. So I think we
> need to expose it on the modules list only after having done the
> "simplify_symbols()" etc.
>
> I dunno.
>
> Does this work?
>
> (Caveat emptor - I tried to make sure the error cases nest correctly, and
> it all compiles, but it's untested. As usual. Rusty mentioned a "see
> testing patch", but I didn't see it. Maybe he did the same thing)

Yep, oops. I am testing a similar thing, but a bit more of a cleanup
on the way.

Moved all the sysfs-exposing stuff to the end just after we put in the
list (and thus to after the find check). In turn spawns a sysfs cleanup
(those funcs exposed for no good reason). Also, your two-way deps patch
really wins since we need to walk the list to create the links.

Code soon...
Rusty
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/