From d513098f3cea4e8ec76794f97d57fc20d2c54ce8 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Mon, 12 May 2014 14:20:17 +0400 Subject: [PATCH] mount: Don't create kids with CLONE_NEWNS We explicitly setns() every single task by hands when restoring mount namespaces, they can be created without the NEWNS flag. Signed-off-by: Pavel Emelyanov Acked-by: Andrey Vagin --- pstree.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pstree.c b/pstree.c index 0c9167a06..d005b645c 100644 --- a/pstree.c +++ b/pstree.c @@ -662,6 +662,14 @@ static int prepare_pstree_kobj_ids(void) set_mask: item->rst->clone_flags = cflags; + if (parent) + /* + * Mount namespaces are setns()-ed at + * restore_task_mnt_ns() explicitly, + * no need in creating it with its own + * temporary namespace + */ + item->rst->clone_flags &= ~CLONE_NEWNS; cflags &= CLONE_ALLNS;