drm/i915: Don't deref context->file_priv ERR_PTR upon reset
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Nov 2016 14:41:18 +0000 (14:41 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Nov 2016 17:42:17 +0000 (17:42 +0000)
commitd9e9da64c4a762493c5ac24b3b2bbc43c2754786
tree8594c57892e0b5dacad62d3938b19872d5571ce8
parent7abbd8d670bb928366aa94332a173aa3d394ebfe
drm/i915: Don't deref context->file_priv ERR_PTR upon reset

When a user context is closed, it's file_priv backpointer is replaced by
ERR_PTR(-EBADF); be careful not to chase this invalid pointer after a
hang and a GPU reset.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: b083a0870c79 ("drm/i915: Add per client max context ban limit")
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161122144121.7379-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c