[lxc-devel] [PATCH] pivot_root: umount ., not /
Michael H. Warfield
mhw at WittsEnd.com
Mon Sep 29 23:34:42 UTC 2014
On Mon, 2014-09-29 at 18:56 -0400, Stéphane Graber wrote:
> On Mon, Sep 29, 2014 at 10:51:35PM +0000, Serge Hallyn wrote:
> > This fixes pivot_root on 3.11 and older kernels.
> >
> > Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
> Got to love one char bugfixes :)
+1
> Acked-by: Stéphane Graber <stgraber at ubuntu.com>
>
> > ---
> > 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;
> > }
> > --
> > 2.1.0
> >
> > _______________________________________________
> > lxc-devel mailing list
> > lxc-devel at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-devel
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
--
Michael H. Warfield (AI4NB) | (770) 978-7061 | mhw at WittsEnd.com
/\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 465 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140929/79afc7b9/attachment.sig>
More information about the lxc-devel
mailing list