[CRIU] [PATCH] cg: Mark yard mount as private
Pavel Emelyanov
xemul at parallels.com
Fri Jun 20 09:34:33 PDT 2014
Otherwise cgroups sub-mounts may propagate to another namespaces
and the directory would become unremovable.
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
diff --git a/cgroup.c b/cgroup.c
index 2d9ebad..5234562 100644
--- a/cgroup.c
+++ b/cgroup.c
@@ -362,6 +362,11 @@ static int prepare_cgroup_sfd(CgSetEntry *root_set)
goto err;
}
+ if (mount("none", cg_yard, NULL, MS_PRIVATE, NULL)) {
+ pr_perror("Can't make cgyard private");
+ goto err;
+ }
+
for (i = 0; i < root_set->n_ctls; i++) {
ControllerEntry *ce = root_set->ctls[i];
char *opt = ce->name;
More information about the CRIU
mailing list