drm/i915: Check for an invalid seqno before __i915_gem_request_started
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 8 Mar 2017 14:22:38 +0000 (14:22 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 8 Mar 2017 20:47:07 +0000 (20:47 +0000)
commit5b5554c51d38a227c4c5bee6e57026e4ebb0bde9
tree3175a217fd0fbd528f7e3f7f6e74adc062e506ef
parentf166244a6dafdbb6c4e9eba77a04fd55a5bf9657
drm/i915: Check for an invalid seqno before __i915_gem_request_started

__i915_gem_request_started() asserts that the seqno is valid, but
i915_spin_request() was not checking before querying whether the request
had started.

Reported-by: Michał Winiarski <michal.winiarski@intel.com>
Fixes: 754c9fd57649 ("drm/i915: Protect the request->global_seqno with the engine->timeline lock")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170308142238.22994-1-chris@chris-wilson.co.uk
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/i915_gem_request.h