[lxc-devel] [PATCH] pivot_root: umount ., not /
Serge Hallyn
serge.hallyn at ubuntu.com
Tue Sep 30 19:07:57 UTC 2014
Quoting Dwight Engen (dwight.engen at oracle.com):
> On Mon, 29 Sep 2014 22:51:35 +0000
> Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
>
> > This fixes pivot_root on 3.11 and older kernels.
> >
> > Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
>
> Acked-by: Dwight Engen <dwight.engen at oracle.com>
> Tested-by: Dwight Engen <dwight.engen at oracle.com>
>
> Thanks Serge!
Andy's the one who caught it, and that after i forced his
laptop to reboot. Thanks Andy :)
> > src/lxc/conf.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/lxc/conf.c b/src/lxc/conf.c
> > index 31673d5..e8979c9 100644
> > --- a/src/lxc/conf.c
> > +++ b/src/lxc/conf.c
> > @@ -1062,7 +1062,7 @@ static int setup_rootfs_pivot_root(const char
> > *rootfs, const char *pivotdir) SYSERROR("Error entering oldroot");
> > goto fail;
> > }
> > - if (umount2("/", MNT_DETACH) < 0) {
> > + if (umount2(".", MNT_DETACH) < 0) {
> > SYSERROR("Error detaching old root");
> > goto fail;
> > }
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
More information about the lxc-devel
mailing list