]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
pivot_root: umount ., not /
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 29 Sep 2014 22:51:35 +0000 (22:51 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 29 Sep 2014 22:57:08 +0000 (18:57 -0400)
This fixes pivot_root on 3.11 and older kernels.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/conf.c

index 31673d53fb6e009c0782d365a439d9ffdbb78a4d..e8979c967daa497e65a5077bc6d37aaa6a6f55c5 100644 (file)
@@ -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;
        }