From: Serge Hallyn Date: Mon, 29 Sep 2014 22:51:35 +0000 (+0000) Subject: pivot_root: umount ., not / X-Git-Tag: lxc-1.1.0.alpha2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7981ea4684c878fe433d34743073c43bfadb870a;p=thirdparty%2Flxc.git pivot_root: umount ., not / This fixes pivot_root on 3.11 and older kernels. Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 31673d53f..e8979c967 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; }