[CRIU] [PATCH] mount: Don't create kids with CLONE_NEWNS
Andrey Vagin
avagin at parallels.com
Wed May 7 07:12:52 PDT 2014
On Wed, May 07, 2014 at 03:15:37PM +0400, Pavel Emelyanov wrote:
> 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 <xemul at parallels.com>
Acked-by: Andrey Vagin <avagin at parallels.com>
Thanks.
>
> ---
>
> diff --git a/pstree.c b/pstree.c
> index 0c9167a..d005b64 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;
>
More information about the CRIU
mailing list