[lxc-devel] [PATCH] pivot_root: umount ., not /

Stéphane Graber stgraber at ubuntu.com
Mon Sep 29 22:56:24 UTC 2014


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

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

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140929/94dd0241/attachment.sig>


More information about the lxc-devel mailing list