From: Przemek Rudy Date: Wed, 29 Jul 2015 17:41:28 +0000 (+0200) Subject: Prevent from error on umount /proc if userns are used. X-Git-Tag: lxc-2.0.0.beta1~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bea9fae9347e4980f3e3a4813503eb98af5c132;p=thirdparty%2Flxc.git Prevent from error on umount /proc if userns are used. Signed-off-by: Przemek Rudy Acked-by: Serge E. Hallyn --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 9870455b3..e6e2a4a2a 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1368,10 +1368,8 @@ int prepare_ramfs_root(char *root) break; } - if (umount2("./proc", MNT_DETACH)) { - SYSERROR("Unable to umount /proc"); - return -1; - } + /* This also can be skipped if a container uses unserns */ + umount2("./proc", MNT_DETACH); /* It is weird, but chdir("..") moves us in a new root */ if (chdir("..") == -1) {