mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Al Viro <viro@ftp.linux.org.uk>,
	Andrew MChuck Ebbert <76306.1226@compuserve.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Dominik Brodowski <linux@dominikbrodowski.net>
Subject: Re: [patch] pipe: Don't oops when pipe filesystem isn't mounted
Date: Mon, 11 Dec 2006 18:08:22 -0800	[thread overview]
Message-ID: <20061211180822.5f7814d5.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0612110748570.12500@woody.osdl.org>

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).



  parent reply	other threads:[~2006-12-12  2:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-11  8:27 Chuck Ebbert
2006-12-11  8:55 ` Andrew Morton
2006-12-11  9:13   ` Andrew Morton
2006-12-11  9:21     ` Al Viro
2006-12-11  9:25       ` Andrew Morton
2006-12-11  9:33         ` Al Viro
2006-12-11  9:47           ` Andrew Morton
2006-12-11 10:03             ` Al Viro
2006-12-11 10:17               ` Andrew Morton
2006-12-11 10:22                 ` Al Viro
2006-12-11 10:34                   ` Andrew Morton
2006-12-11 10:47                     ` Al Viro
2006-12-11 10:57                     ` Jeff Garzik
2006-12-11 10:27                 ` Andrew Morton
2006-12-11 10:45                   ` Al Viro
2006-12-11 16:01                     ` Linus Torvalds
2006-12-11 16:12                       ` Al Viro
2006-12-11 16:40                         ` Linus Torvalds
2006-12-12  0:33                           ` Benjamin Herrenschmidt
2006-12-12  2:08                       ` Andrew Morton [this message]
2006-12-12  2:17                         ` Dominik Brodowski
2006-12-12  2:23                         ` Linus Torvalds
2006-12-11 10:52                 ` [PATCH] get rid of ARCH_HAVE_XTIME_LOCK Eric Dumazet
2006-12-11 13:50                   ` [PATCH] Optimize calc_load() Eric Dumazet
2006-12-11 19:04                     ` [PATCH] constify pipe_buf_operations Eric Dumazet
2006-12-11  9:13 ` [patch] pipe: Don't oops when pipe filesystem isn't mounted Al Viro
2006-12-11  9:40   ` Michael Tokarev
2006-12-11 15:44 ` Linus Torvalds
2006-12-12 12:20   ` Michael Tokarev
2006-12-11  9:33 Chuck Ebbert
2006-12-11 10:48 ` Olaf Hering
2006-12-11 10:52   ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061211180822.5f7814d5.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=76306.1226@compuserve.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=torvalds@osdl.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®