[lxc-devel] [PATCH] pivot_root: umount ., not /
Dwight Engen
dwight.engen at oracle.com
Tue Sep 30 18:43:04 UTC 2014
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!
> ---
> 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;
> }
More information about the lxc-devel
mailing list