2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

cg: Mark yard mount as private

Otherwise cgroups sub-mounts may propagate to another namespaces
and the directory would become unremovable.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2014-06-20 20:34:00 +04:00
parent 876def9546
commit f52efcce0a

View File

@@ -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;