[CRIU] [PATCH 04/10] cgroup: don't CLONE_NEWCGROUP on clone
Tycho Andersen
tycho.andersen at canonical.com
Wed Mar 2 11:28:53 PST 2016
These flags are restored differently, so let's not make extra namespaces
where we don't need them.
Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
criu/cr-restore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 8c752d1..a39c094 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -1209,7 +1209,7 @@ static inline int fork_with_pid(struct pstree_item *item)
* Here is an idea -- unhare net namespace in callee instead.
*/
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) {
pr_perror("Can't fork for %d", pid);
--
2.7.0
More information about the CRIU
mailing list