summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorChris Wilson2014-02-25 15:23:28 +0100
committerDaniel Vetter2014-03-05 21:30:23 +0100
commit64bf930379ac8097705db7d40602c2aa9ec0d2f4 (patch)
tree4c4e2159e9b24b0c65b17cacd5a1be6ecdbea340 /drivers/gpu/drm/i915/i915_gem.c
parentdrm/i915: Streamline VLV forcewake handling (diff)
downloadkernel-qcow2-linux-64bf930379ac8097705db7d40602c2aa9ec0d2f4.tar.gz
kernel-qcow2-linux-64bf930379ac8097705db7d40602c2aa9ec0d2f4.tar.xz
kernel-qcow2-linux-64bf930379ac8097705db7d40602c2aa9ec0d2f4.zip
drm/i915: Reset vma->mm_list after unbinding
In place of true activity counting, we walk the list of vma associated with an object managing each on the vm's active/inactive list everytime we call move-to-inactive. This depends upon the vma->mm_list being cleared after unbinding, or else we run into difficulty when tracking the object in multiple vm's - we see a use-after free and corruption of the mm_list. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0ec1080b1912..b41ead633963 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2739,7 +2739,7 @@ int i915_vma_unbind(struct i915_vma *vma)
i915_gem_gtt_finish_object(obj);
- list_del(&vma->mm_list);
+ list_del_init(&vma->mm_list);
/* Avoid an unnecessary call to unbind on rebind. */
if (i915_is_ggtt(vma->vm))
obj->map_and_fenceable = true;