[CRIU] [PATCH 05/16] restore: don't add unneeded vma with zero start and end addresses

Pavel Emelyanov xemul at parallels.com
Tue Nov 20 09:00:18 EST 2012


On 11/14/2012 09:19 PM, Andrey Vagin wrote:

> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  cr-restore.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/cr-restore.c b/cr-restore.c
> index 1dfe833..276cf49 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -194,12 +194,13 @@ static int read_vmas(int pid, struct list_head *vmas, int *nr_vmas)
>  		if (!vma)
>  			break;
>  
> -		(*nr_vmas)++;
> -		list_add_tail(&vma->list, vmas);
>  		ret = pb_read_one_eof(fd, &e, PB_VMAS);
>  		if (ret <= 0)
>  			break;
>  
> +		(*nr_vmas)++;
> +		list_add_tail(&vma->list, vmas);
> +

This breaks git-bisect-ness, doesn't it?

>  		if (e->fd != -1) {
>  			ret = -1;
>  			pr_err("Error in vma->fd setting (%Ld)\n",
> 




More information about the CRIU mailing list