]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Check new context against kernel_context after reporting an error
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 5 Jul 2017 14:26:31 +0000 (15:26 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 6 Jul 2017 10:50:47 +0000 (11:50 +0100)
commit6630d29dd86b93ddca8d3bc9c88230a287b51ea2
tree502a1066ec90bbf4842334e69c201b7caf629b81
parente73bab42c3fdb0824b32e0c2f77027c8badde41f
drm/i915: Check new context against kernel_context after reporting an error

Avoid any pointer dereference in inspecting a potential PTR_ERR by
checking for the error pointer before checking for an invalid context.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170705142634.18554-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_context.c