aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>2022-06-10 15:12:05 +0300
committerMatthew Auld <matthew.auld@intel.com>2022-06-22 11:17:05 +0100
commitafd5cb3907eaf43e4ca88c162b92143551f0323e (patch)
treebbe2632c60a165dec7c23758c618644f9d3422de
parentdrm/i915/gem: add missing else (diff)
downloadlinux-dev-afd5cb3907eaf43e4ca88c162b92143551f0323e.tar.xz
linux-dev-afd5cb3907eaf43e4ca88c162b92143551f0323e.zip
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 <juhapekka.heikkila@gmail.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Signed-off-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220610121205.29645-3-juhapekka.heikkila@gmail.com
-rw-r--r--drivers/gpu/drm/i915/i915_vma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 0bffb70b3c5f..d333c4416997 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -1907,9 +1907,11 @@ struct dma_fence *__i915_vma_evict(struct i915_vma *vma, bool async)
/* release the fence reg _after_ flushing */
i915_vma_revoke_fence(vma);
- __i915_vma_iounmap(vma);
clear_bit(I915_VMA_CAN_FENCE_BIT, __i915_vma_flags(vma));
}
+
+ __i915_vma_iounmap(vma);
+
GEM_BUG_ON(vma->fence);
GEM_BUG_ON(i915_vma_has_userfault(vma));