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

Andrew Vagin avagin at parallels.com
Tue Nov 20 09:18:08 EST 2012


On Tue, Nov 20, 2012 at 06:00:18PM +0400, Pavel Emelyanov wrote:
> 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?

No, it doesn't. This patch fixes a bug in crtools. I check, that all
tests passed after it.

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


More information about the CRIU mailing list