[klibc] Re: chicken/egg between pipefs and initramfs/hotplug

Thayne Harbaugh tharbaugh at lnxi.com
Thu Oct 28 09:23:46 PDT 2004


Sorry to take so long to reply.

On Tue, 2004-10-26 at 16:29 -0700, Andrew Morton wrote:
> Thayne Harbaugh <tharbaugh at lnxi.com> wrote:
> >
> > It appears that linux/init/main.c:init() has a chicken/egg problem.
> > Apparently modprobe and other programs need a pipe and pipefs isn't
> > mounted until later on in do_basic_setup()/do_initcalls().  That means
> > that linux/fs/pipe.c:static struct vfsmount *pipe_mnt;  isn't
> > initialized and blows up when it's derefernced in
> > linux/fs/pipe.c:get_pipe_inode().
> 
> That's a bit sad.  Does this fix it?
> 
> --- 25/fs/pipe.c~a	Tue Oct 26 16:28:44 2004
> +++ 25-akpm/fs/pipe.c	Tue Oct 26 16:28:52 2004
> @@ -718,5 +718,5 @@ static void __exit exit_pipe_fs(void)
>  	mntput(pipe_mnt);
>  }
>  
> -module_init(init_pipe_fs)
> +fs_initcall(init_pipe_fs)
>  module_exit(exit_pipe_fs)
> _

Works great, other than the omitted ';' for the fs_initcall():

--- fs/pipe.c.orig      2004-10-28 08:59:47.383192448 -0600
+++ fs/pipe.c   2004-10-28 08:57:07.746460920 -0600
@@ -718,5 +718,5 @@
        mntput(pipe_mnt);
 }

-module_init(init_pipe_fs)
+fs_initcall(init_pipe_fs);
 module_exit(exit_pipe_fs)

Thanks.

-- 
Thayne Harbaugh
Linux Networx
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.zytor.com/pipermail/klibc/attachments/20041028/5e19826a/attachment.bin


More information about the klibc mailing list