]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Clear execbuf's vma backpointer upon release
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 Jun 2017 10:47:22 +0000 (11:47 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 Jun 2017 11:59:07 +0000 (12:59 +0100)
commite394d2c9cd9639214eedf5dd538bde5d69154e1d
treea5fce8c353a9fc0344148f71369e5b5a253f1542
parentf9b774d07f921ec010baeb199771af9b3dca6ba6
drm/i915: Clear execbuf's vma backpointer upon release

commit a3260046f7bb ("drm/i915: Eliminate lots of iterations over the
execobjects array") jiggled around the error handling and replace a test
that we cleaned up properly after ourselves with an assertion. That
assertion failed because in the release function (moments after the
assertion) we were indeed forgetting to mark the vma as cleared. The
consequence was when testing an invalid relocation address, we would try
to release the vma twice (following the couple of attempts to verify the
address) and on the second release notice that the first release was
incomplete.

Testcase: igt/gem_reloc_overflow/invalid-address
Fixes: a3260046f7bb ("drm/i915: Eliminate lots of iterations over the execobjects array")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170622104722.2583-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/i915_gem_execbuffer.c