summaryrefslogtreecommitdiff
path: root/intel
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-14 08:20:10 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-14 08:23:02 +0000
commit0ab2251b70d49a294d24f3ef54982e95226c104a (patch)
tree3a61643042c1de7af5f709934adef0d80198dce6 /intel
parentac168bf2a068761b591187e6a0a52083d456280b (diff)
intel: Reset vma list upon purge
During free we unconditionally delete the bo from the vma cache. This relies on the its list member being kept in a sane state. This fails after the object is purged, as the purge operation performs a pure deletion and doesn't reset the list member, leaving a pair of dangling pointers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'intel')
-rw-r--r--intel/intel_bufmgr_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 19441f3b..eb9dd32f 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -958,7 +958,7 @@ static void drm_intel_gem_bo_purge_vma_cache(drm_intel_bufmgr_gem *bufmgr_gem)
bufmgr_gem->vma_cache.next,
vma_list);
assert(bo_gem->map_count == 0);
- DRMLISTDEL(&bo_gem->vma_list);
+ DRMLISTDELINIT(&bo_gem->vma_list);
if (bo_gem->mem_virtual) {
munmap(bo_gem->mem_virtual, bo_gem->bo.size);