]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/i915: Protect timeline->hwsp dereferencing
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 19 Sep 2019 11:19:12 +0000 (12:19 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 20 Sep 2019 09:24:13 +0000 (10:24 +0100)
commit9eee0dd7d3a4e2620257f1532cba8f013aee954f
tree0ac922c8f1b7a512734c330102df50e9c6ba5652
parent6a79d848403ded2245fbe4aaf50b33118d12daf0
drm/i915: Protect timeline->hwsp dereferencing

As not only is the signal->timeline volatile, so will be acquiring the
timeline's HWSP. We must first carefully acquire the timeline from the
signaling request and then lock the timeline. With the removal of the
struct_mutex serialisation of request construction, we can have multiple
timelines active at once, and so we must avoid using the nested mutex
lock as it is quite possible for both timelines to be establishing
semaphores on the other and so deadlock.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190919111912.21631-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_timeline.c