[CRIU] [PATCH 1/2] pagemap: Introduce pagemap cache

Andrew Vagin avagin at parallels.com
Tue Feb 11 12:21:57 PST 2014


On Wed, Feb 12, 2014 at 12:06:01AM +0400, Cyrill Gorcunov wrote:
> On Tue, Feb 11, 2014 at 11:57:16PM +0400, Andrew Vagin wrote:
> > > +
> > > +	/*
> > > +	 * Cache miss -- fill the cache.
> > > +	 */
> > > +	pmc->start	= vma->e->start;
> > > +	pmc->end	= pmc->start + pmc->nr_pages * PAGE_SIZE;
> > > +	head		= container_of(vma->list.prev, struct vma_area, list);
> > 
> > head???
> 
> Yes. It become a "head" of list for this case. Look, I'm receiving vma, it is
> linked to the list, so I pick it as a head and walk forward.

You will get SEGV, when you find the real head...


More information about the CRIU mailing list