[Intel-gfx] [PATCH] drm/i915: Fix vmap_batch page iterator overrun
Daniel Vetter
daniel at ffwll.ch
Fri Mar 13 10:36:12 PDT 2015
On Fri, Mar 13, 2015 at 02:05:46PM +0000, Chris Wilson wrote:
> On Fri, Mar 13, 2015 at 03:21:53PM +0200, Mika Kuoppala wrote:
> > vmap_batch() calculates amount of needed pages for the mapping
> > we are going to create. And it uses this page count as an
> > argument for the for_each_sg_pages() macro. The macro takes the number
> > of sg list entities as an argument, not the page count. So we ended
> > up iterating through all the pages on the mapped object, corrupting
> > memory past the smaller pages[] array.
> >
> > Fix this by bailing out when we have enough pages.
Reference to the commit which has introduced this regression is missing,
I've added that. Also for next time around pls cc everyone on that patch,
especially also reviewers.
> >
> > Cc: Chris Wilson <chris at chris-wilson.co.uk>
> > Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list