Commit d513098f authored by Pavel Emelyanov's avatar Pavel Emelyanov

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: 's avatarPavel Emelyanov <xemul@parallels.com>
Acked-by: 's avatarAndrey Vagin <avagin@parallels.com>
parent 63c9478a
...@@ -662,6 +662,14 @@ static int prepare_pstree_kobj_ids(void) ...@@ -662,6 +662,14 @@ static int prepare_pstree_kobj_ids(void)
set_mask: set_mask:
item->rst->clone_flags = cflags; 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; cflags &= CLONE_ALLNS;
......
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