Commit f52efcce authored by Pavel Emelyanov's avatar Pavel Emelyanov

cg: Mark yard mount as private

Otherwise cgroups sub-mounts may propagate to another namespaces
and the directory would become unremovable.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 876def95
...@@ -362,6 +362,11 @@ static int prepare_cgroup_sfd(CgSetEntry *root_set) ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment