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

Cyrill Gorcunov gorcunov at gmail.com
Tue Feb 11 12:24:24 PST 2014


On Wed, Feb 12, 2014 at 12:21:57AM +0400, Andrew Vagin wrote:
> 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...

Well, due to pagemap specifics (big areas at the end of maps) I won't hit
the real head, but I agree that this is confusing point and potential
problem. Thanks, will update!


More information about the CRIU mailing list