lkml.org 
[lkml]   [2006]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] pipe: Don't oops when pipe filesystem isn't mounted
    On Mon, 11 Dec 2006 08:01:40 -0800 (PST)
    Linus Torvalds <torvalds@osdl.org> wrote:

    >
    >
    > On Mon, 11 Dec 2006, Al Viro wrote:
    >
    > > On Mon, Dec 11, 2006 at 02:27:46AM -0800, Andrew Morton wrote:
    > > > @@ -115,6 +115,11 @@ extern void setup_arch(char **);
    > > > #define device_initcall_sync(fn) __define_initcall("6s",fn,6s)
    > > > #define late_initcall(fn) __define_initcall("7",fn,7)
    > > > #define late_initcall_sync(fn) __define_initcall("7s",fn,7s)
    > > > +#define populate_rootfs_initcall(fn) __define_initcall("8",fn,8)
    > > > +#define populate_rootfs_initcall_sync(fn) __define_initcall("8s",fn,8s)
    > > > +#define rootfs_neeeded_initcall(fn) __define_initcall("9",fn,9)
    > > > +#define rootfs_neeeded_initcall_sync(fn) __define_initcall("9s",fn,9s)
    > >
    > > Ewww.... After module_init()? Please, don't. Come on, if it can
    > > be a module, it _must_ be ready to run late in the game.
    >
    > Yeah, I think you should just run "populate_rootfs()" just before
    > "module_init" (which is the same as "device_initcall()").
    >
    > So perhaps somethign like this? (totally untested)
    >
    > Btw, if the linker sorts sections some way (does it?) we could probably
    > just make the vmlinux.lds.S file do
    >
    > *(.initcall*.init)
    >
    > or something, and then just let special cases like this use
    >
    > __initcall(myfn, 5.1);
    >
    > to show that it's between levels 5 and 6. But that would depend on the
    > linker section beign sorted alphabetically. Does anybody know if the
    > linker sorts these things somehow?
    >
    > This patch is totally untested, but it looks obvious. It just says that
    > we'll populate rootfs _after_ we've done the fs-level initcalls, but
    > before we do any actual "device" initcalls.
    >
    > If any really core stuff needs user-land - tough titties, as they say.
    >
    > Linus
    > ----
    > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
    > index 6e9fceb..7437cca 100644
    > --- a/include/asm-generic/vmlinux.lds.h
    > +++ b/include/asm-generic/vmlinux.lds.h
    > @@ -242,6 +242,7 @@
    > *(.initcall4s.init) \
    > *(.initcall5.init) \
    > *(.initcall5s.init) \
    > + *(.initcallrootfs.init) \
    > *(.initcall6.init) \
    > *(.initcall6s.init) \
    > *(.initcall7.init) \
    > diff --git a/include/linux/init.h b/include/linux/init.h
    > index 5eb5d24..5a593a1 100644
    > --- a/include/linux/init.h
    > +++ b/include/linux/init.h
    > @@ -111,6 +111,7 @@ extern void setup_arch(char **);
    > #define subsys_initcall_sync(fn) __define_initcall("4s",fn,4s)
    > #define fs_initcall(fn) __define_initcall("5",fn,5)
    > #define fs_initcall_sync(fn) __define_initcall("5s",fn,5s)
    > +#define rootfs_initcall(fn) __define_initcall("rootfs",fn,rootfs)
    > #define device_initcall(fn) __define_initcall("6",fn,6)
    > #define device_initcall_sync(fn) __define_initcall("6s",fn,6s)
    > #define late_initcall(fn) __define_initcall("7",fn,7)

    Looks like this might break pcmcia which for some reason does firmware
    requesting at fs_initcall level (drivers/pcmcia/ds.c).


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

    \
     
     \ /
      Last update: 2006-12-12 03:11    [W:0.027 / U:1.044 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site