[CRIU] [PATCH] mount: sysfs -- Use slave mounting for the root

Cyrill Gorcunov gorcunov at openvz.org
Mon Jul 25 15:02:59 PDT 2016


Seems this snippet escaeped from commit
84bf1ad467942a145a9df99d1397a63817893a91
so we may get -EBUSY in open_detach_mount.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/net.c b/criu/net.c
index a6d5f001bbc0..a03c168a2bf9 100644
--- a/criu/net.c
+++ b/criu/net.c
@@ -1390,7 +1390,7 @@ static int mount_ns_sysfs(void)
 		return -1;
 	}
 
-	if (mount(NULL, "/", NULL, MS_PRIVATE | MS_REC, NULL)) {
+	if (mount(NULL, "/", NULL, MS_SLAVE | MS_REC, NULL)) {
 		pr_perror("Can't mark the root mount as private");
 		return -1;
 	}
-- 
2.7.4



More information about the CRIU mailing list