Commit dae14ddf authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

cgroup: don't CLONE_NEWCGROUP on clone

These flags are restored differently, so let's not make extra namespaces
where we don't need them.
Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 0e7d91e4
...@@ -1209,7 +1209,7 @@ static inline int fork_with_pid(struct pstree_item *item) ...@@ -1209,7 +1209,7 @@ static inline int fork_with_pid(struct pstree_item *item)
* Here is an idea -- unhare net namespace in callee instead. * Here is an idea -- unhare net namespace in callee instead.
*/ */
ret = clone(restore_task_with_children, ca.stack_ptr, ret = clone(restore_task_with_children, ca.stack_ptr,
(ca.clone_flags & ~CLONE_NEWNET) | SIGCHLD, &ca); (ca.clone_flags & (~CLONE_NEWNET | ~CLONE_NEWCGROUP)) | SIGCHLD, &ca);
if (ret < 0) { if (ret < 0) {
pr_perror("Can't fork for %d", pid); pr_perror("Can't fork for %d", pid);
......
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