Skip to content

Commit bdbbf7d

Browse files
ickledanvet
authored andcommitted
drm/i915: Clear execbuf's vma backpointer upon release
commit 2889caa ("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: 2889caa ("drm/i915: Eliminate lots of iterations over the execobjects array") Signed-off-by: Chris Wilson <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Tvrtko Ursulin <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Tvrtko Ursulin <[email protected]> (cherry picked from commit 51d05e1) Signed-off-by: Daniel Vetter <[email protected]>
1 parent b88eb19 commit bdbbf7d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/i915/i915_gem_execbuffer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@ static void eb_release_vmas(const struct i915_execbuffer *eb)
878878

879879
GEM_BUG_ON(vma->exec_entry != entry);
880880
vma->exec_entry = NULL;
881+
__exec_to_vma(entry) = 0;
881882

882883
if (entry->flags & __EXEC_OBJECT_HAS_PIN)
883884
__eb_unreserve_vma(vma, entry);

0 commit comments

Comments
 (0)