[CRIU] Re: [PATCH cr 04/11] restore: collect vma-s before creating children

Pavel Emelyanov xemul at parallels.com
Tue Oct 16 11:32:24 EDT 2012


On 10/15/2012 09:57 PM, Andrey Vagin wrote:
> On Mon, Oct 15, 2012 at 08:20:24PM +0400, Pavel Emelyanov wrote:
>>> @@ -170,15 +173,18 @@ err:
>>>  	return ret;
>>>  }
>>>  
>>> -static int read_vmas(int pid, struct list_head *vmas, int *nr_vmas)
>>> +static int read_vmas(int pid)
>>>  {
>>> -	int fd, ret = -1;
>>> +	int fd, ret = 0;
>>> +
>>> +	INIT_LIST_HEAD(&vma_list);
>>
>> Isn't it init-ed already?
> It can contain old vmas, which remain from a parent.

Really? I don't see this in _this_ patch. Plz, split patches carefully.

>>
>>>  
>>> +	/* Skip errors, because a zombie doesn't have an image of vmas */
>>>  	fd = open_image_ro(CR_FD_VMAS, pid);
>>>  	if (fd < 0)
>>> -		return fd;
>>> +		return ret;
>>>  
>>> -	*nr_vmas = 0;
>>> +	nr_vmas = 0;
>>>  	while (1) {
>>>  		struct vma_area *vma;
>>>  		VmaEntry *e;
> .
> 




More information about the CRIU mailing list