[CRIU] [PATCH 2/2] restore: Return error instead of BUG_ON on image corruption

Cyrill Gorcunov gorcunov at openvz.org
Mon Mar 25 07:33:15 EDT 2013


On Mon, Mar 25, 2013 at 02:57:39PM +0400, Andrew Vagin wrote:
...
> >  		for (i = 0; i < pe->nr_pages; i++) {
> >  			unsigned char buf[PAGE_SIZE];
> >  			void *p;
> >  
> >  			while (va >= vma->vma.end) {
> > -				BUG_ON(vma->list.next == &rst_vmas.h);
> > +				if (vma->list.next == &rst_vmas.h)
> > +					goto err_addr;
> >  				vma = list_entry(vma->list.next, struct vma_area, list);
> >  			}
> 
> The check about vma->vma.start should be here

I addressed it in another patch using in_vma_area helper.


More information about the CRIU mailing list