summaryrefslogtreecommitdiff
path: root/src/sna/kgem.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-03-12 12:17:55 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-03-12 12:23:53 +0000
commit08d73f1a4499cfe7c3121ff2ecdd36729c5f3544 (patch)
tree87805704e2a098cb3bad69c3d6e9301212813260 /src/sna/kgem.h
parent2f50261539618c30c8470a5795fe5c2440e2318f (diff)
sna: Only couple up a proxy->rq when inserting into the request->buffers list
Otherwise, we may never decouple it again afterwards leading to a dangling pointer dereference. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1289923 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.h')
-rw-r--r--src/sna/kgem.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index fdabd504..cb0055e6 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -630,6 +630,8 @@ static inline void __kgem_bo_mark_dirty(struct kgem_bo *bo)
bo->handle, bo->proxy != NULL));
assert(bo->refcnt);
+ assert(bo->exec);
+ assert(bo->rq);
bo->exec->flags |= LOCAL_EXEC_OBJECT_WRITE;
bo->needs_flush = bo->gpu_dirty = true;