Skip to content

Commit afd5cb3

Browse files
juhapekkamatt-auld
authored andcommitted
drm/i915: don't leak lmem mapping in vma_evict
Don't leak lmem mapping in vma_evict, move __i915_vma_iounmap outside i915_vma_is_map_and_fenceable. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Signed-off-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 7482a65 commit afd5cb3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/i915/i915_vma.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1907,9 +1907,11 @@ struct dma_fence *__i915_vma_evict(struct i915_vma *vma, bool async)
19071907
/* release the fence reg _after_ flushing */
19081908
i915_vma_revoke_fence(vma);
19091909

1910-
__i915_vma_iounmap(vma);
19111910
clear_bit(I915_VMA_CAN_FENCE_BIT, __i915_vma_flags(vma));
19121911
}
1912+
1913+
__i915_vma_iounmap(vma);
1914+
19131915
GEM_BUG_ON(vma->fence);
19141916
GEM_BUG_ON(i915_vma_has_userfault(vma));
19151917

0 commit comments

Comments
 (0)