mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 14:55:39 +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:
5
cgroup.c
5
cgroup.c
@@ -362,6 +362,11 @@ static int prepare_cgroup_sfd(CgSetEntry *root_set)
|
|||||||
goto err;
|
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++) {
|
for (i = 0; i < root_set->n_ctls; i++) {
|
||||||
ControllerEntry *ce = root_set->ctls[i];
|
ControllerEntry *ce = root_set->ctls[i];
|
||||||
char *opt = ce->name;
|
char *opt = ce->name;
|
||||||
|
Reference in New Issue
Block a user