]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix race on unreferencing the wrong mmio-flip-request
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 27 Apr 2015 12:41:16 +0000 (13:41 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 20 May 2015 09:25:46 +0000 (11:25 +0200)
commit74a690fc1e587096bdc71f709ed773de5bb5c745
tree7b47121a58fefbee057016d2f739445b9899b412
parent41aaa881c1e4c9b2a09f81b6a239e4d2501b0578
drm/i915: Fix race on unreferencing the wrong mmio-flip-request

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 ee8eeaf13ddd2d04e4dcc26a1e3c1249aa61a552
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@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@chris-wilson.co.uk>
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h