[CRIU] [PATCH 2/3] restore: restore mntns before creating private vma-s

Andrey Vagin avagin at openvz.org
Thu Nov 12 11:30:05 PST 2015


2015-11-12 21:28 GMT+03:00 Pavel Emelyanov <xemul at parallels.com>:
> 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"?

The case when a file is opened from another is fixed in the next patch.
>
> And does the test from patch #1 check this bug?

Yes. It checks this bug and a bug which were fixed by Andrey Ryabinin

>
>> 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