[Intel-gfx] [PATCH 05/16] drm/i915: Fix race on unreferencing the wrong mmio-flip-request

Chris Wilson chris at chris-wilson.co.uk
Mon May 11 13:23:48 PDT 2015


On Mon, May 11, 2015 at 06:51:03PM +0200, Daniel Vetter wrote:
> On Mon, Apr 27, 2015 at 01:41:16PM +0100, Chris Wilson wrote:
> > As we perform the mmio-flip without any locking and then try to acquire
> > the struct_mutex prior to dereferencing the request, it is possible for
> > userspace to queue a new pageflip before the worker can finish clearing
> > the old state - and then it will clear the new flip request. The result
> > is that the new flip could be completed before the GPU has finished
> > rendering.
> > 
> > The bugs stems from removing the seqno checking in
> > commit 536f5b5e86b225dab94c7ff8061ae482b6077387
> > Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> > Date:   Thu Nov 6 11:03:40 2014 +0200
> > 
> >     drm/i915: Make mmio flip wait for seqno in the work function
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> 
> I think I grumbled about this before, but the rq vs. req distinction
> elludes me. rq = runqueue in my reading ... What do we need to use "req"
> for that we're forced to have such an ambigious name for requests?

Because I use rq everywhere and runqueues aren't very common in the
kernel? Besides which why did you change some of my _request to _req?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list