From 84611a96e5cf1b0639c28d30d350e4ce3ee79f4b Mon Sep 17 00:00:00 2001 From: Przemek Rudy Date: Wed, 29 Jul 2015 19:41:28 +0200 Subject: [PATCH] Prevent from error on umount /proc if userns are used. Signed-off-by: Przemek Rudy Acked-by: Serge E. Hallyn --- src/lxc/conf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 1153c9023..d01a76bd9 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1699,10 +1699,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) { -- 2.47.2