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

Pavel Emelyanov xemul at parallels.com
Mon Oct 15 12:20:24 EDT 2012


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

>  
> +	/* 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