blob: 948332e2c836ba25eb35d23d1437016941f1dbb4 [file] [log] [blame]
From a35424bc1cd91732fb3dae696f5a65fab604ca5e Mon Sep 17 00:00:00 2001
From: Chris Wilson <>
Date: Tue, 20 Aug 2013 12:56:40 +0100
Subject: drm/i915: Don't destroy the vma placeholder during execbuffer
The execbuffer handle and exec_link were moved from the object into the
vma. As the vma may be unbound and destroyed whilst attempting to
reserve the execbuffer objects (either through a forced unbind to fix up
a misalignment or through an evict-everything call) we need to prevent
the free of the i915_vma itself. Otherwise not only is the list of
objects to reserve corrupt, but we continue to reference stale vma
Fixes kernel crash with i-g-t/gem_evict_everything
This regression has been introduced in
commit 04038a515d6eda6dd0857c0ade0b3950d372f4c0
Author: Ben Widawsky <>
AuthorDate: Wed Aug 14 11:38:36 2013 +0200
drm/i915: Convert execbuf code to use vmas
Reported-by: Dan Carpenter <>
Signed-off-by: Chris Wilson <>
Cc: Ben Widawsky <>
Signed-off-by: Daniel Vetter <>
(cherry picked from commit aaa0566792dc7ae68deb1959663581ea8c75d311)
Signed-off-by: Darren Hart <>
drivers/gpu/drm/i915/i915_gem.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6820d0a1231f..29b7e1c32b84 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4159,6 +4159,11 @@ void i915_gem_vma_destroy(struct i915_vma *vma)
+ /* Keep the vma as a placeholder in the execbuffer reservation lists */
+ if (!list_empty(&vma->exec_list))
+ return;