[PATCH 3/3] drm/i915: Fix gem object not available on close

Janusz Krzysztofik janusz.krzysztofik at linux.intel.com
Tue Apr 30 13:57:51 UTC 2019


An attempt to resolve GEM_BUG_ON(vma->obj != obj) when a gem handle is
being closed after driver unbind / device unplug.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 4c1793b1012e..ef9f6ee69492 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2769,7 +2769,7 @@ void i915_gem_close_object(struct drm_gem_object *gem, struct drm_file *file)
 			continue;
 
 		vma = radix_tree_delete(&ctx->handles_vma, lut->handle);
-		GEM_BUG_ON(vma->obj != obj);
+		GEM_BUG_ON(vma->obj && vma->obj != obj);
 
 		/* We allow the process to have multiple handles to the same
 		 * vma, in the same fd namespace, by virtue of flink/open.
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list