[CRIU] [PATCH 2/3] restore: restore mntns before creating private vma-s
Pavel Emelyanov
xemul at parallels.com
Thu Nov 12 10:28:29 PST 2015
On 11/12/2015 07:09 PM, Andrey Vagin wrote:
> From: Andrew Vagin <avagin at virtuozzo.com>
>
> We need to open a file to restore a file mapping and this file
> can be from a current mntns.
Did you want to say "from another"?
And does the test from patch #1 check this bug?
> Reported-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
> Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
> ---
> cr-restore.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/cr-restore.c b/cr-restore.c
> index 0350a23..c5b5c67 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -1530,6 +1530,9 @@ static int restore_task_with_children(void *_arg)
> goto err_fini_mnt;
> }
>
> + if (restore_task_mnt_ns(current))
> + goto err_fini_mnt;
> +
> if (prepare_mappings())
> goto err_fini_mnt;
>
> @@ -1559,9 +1562,6 @@ static int restore_task_with_children(void *_arg)
> if (create_children_and_session())
> goto err_fini_mnt;
>
> - if (restore_task_mnt_ns(current))
> - goto err_fini_mnt;
> -
> if (unmap_guard_pages())
> goto err_fini_mnt;
>
>
More information about the CRIU
mailing list