public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Neil Brown <neilb@suse.de>
Cc: linux-kernel@vger.kernel.org, Al Viro <viro@ftp.linux.org.uk>
Subject: Re: [PATCH] pivot_root broken in 2.6.15-rc1-mm2
Date: Wed, 23 Nov 2005 23:54:00 -0600	[thread overview]
Message-ID: <200511232354.00843.rob@landley.net> (raw)
In-Reply-To: <17285.19207.788744.48747@cse.unsw.edu.au>

On Wednesday 23 November 2005 23:09, Neil Brown wrote:
> On Wednesday November 23, rob@landley.net wrote:
> > On Tuesday 22 November 2005 20:07, Neil Brown wrote:
> > > Pivot_root seems to be broken in 2.6.15-rc1-mm2.
> > >
> > > I havea initramfs filesystem, mount a ext3 filesystem (which has /mnt)
> > > at '/root' and
> > >
> > >   cd /root
> > >   pivot . mnt
> > >
> > > and it says -EINVAL.
> >
> > You can't pivot_root initramfs because initramfs is rootfs.
> >
> > I wrote Documentation/filesystems/ramfs-rootfs-initramfs.txt just for
> > this occasion. :)
>
> Unfortunately, 'man pivot_root' nor 'use the source, Luke' contain
> pointers to this particular useful document.  They both list assorted
> restrictions on pivot_root, but not this one.
>
> How about the following?
>
> Thanks,
> NeilBrown
>
> Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Rob Landley <rob@landley.net>

> ### Diffstat output
>  ./fs/namespace.c |    4 ++++
>  1 file changed, 4 insertions(+)
>
> diff ./fs/namespace.c~current~ ./fs/namespace.c
> --- ./fs/namespace.c~current~ 2005-11-23 14:24:59.000000000 +1100
> +++ ./fs/namespace.c 2005-11-24 16:07:01.000000000 +1100
> @@ -1526,6 +1526,10 @@ static void chroot_fs_refs(struct nameid
>   * pointed to by put_old must yield the same directory as new_root. No
> other * file system may be mounted on put_old. After all, new_root is a
> mountpoint. *
> + * Also, the current root cannot be on the 'rootfs' (initial ramfs)
> filesystem. + * See Documentation/filesystems/ramfs-rootfs-initramfs.txt
> for alternatives + * in this situation.
> + *
>   * Notes:
>   *  - we don't move root/cwd if they are not at the root (reason: if
> something *    cared enough to change them, it's probably wrong to force
> them elsewhere)

  reply	other threads:[~2005-11-24  5:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-23  2:07 pivot_root broken in 2.6.15-rc1-mm2 Neil Brown
2005-11-23  2:15 ` Al Viro
2005-11-23  2:38   ` Johannes Stezenbach
2005-11-23  3:01   ` Neil Brown
2005-11-23 12:02     ` Rob Landley
2005-11-25 11:52       ` Nix
2005-11-25 13:16         ` Rob Landley
2005-11-25 15:32           ` Nix
2005-11-23 11:43 ` Rob Landley
2005-11-24  5:09   ` Neil Brown
2005-11-24  5:54     ` Rob Landley [this message]
2005-11-25 11:53   ` Nix

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=200511232354.00843.rob@landley.net \
    --to=rob@landley.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --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