drm/i915: Drop rq->ring->vma peeking from error capture
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 24 Apr 2020 19:14:10 +0000 (20:14 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 24 Apr 2020 21:14:35 +0000 (22:14 +0100)
commit9669a5079995ddbe161243ca3e6cc86ca3ab6500
treee764c31b231b6eff1684a586305912694a35c0d9
parent9c878557b1ebd23316b65e4099313a4b0c21eac4
drm/i915: Drop rq->ring->vma peeking from error capture

We only hold the active spinlock while dumping the error state, and this
does not prevent another thread from retiring the request -- as it is
quite possible that despite us capturing the current state, the GPU has
completed the request. As such, it is dangerous to dereference state
below the request as it may already be freed, and the simplest way to
avoid the danger is not include it in the error state.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1788
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Andi Shyti <andi.shyti@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200424191410.27570-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_gpu_error.h