diff mbox

Oops at i915_gem_retire_requests_ring

Message ID 20110317123906.GA1857@herton-IdeaPad-Y430 (mailing list archive)
State New, archived
Headers show

Commit Message

Herton Ronaldo Krzesinski March 17, 2011, 12:39 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 36e66cc..6077c0d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1749,8 +1749,10 @@  i915_gem_request_remove_from_client(struct drm_i915_gem_request *request)
 		return;
 
 	spin_lock(&file_priv->mm.lock);
-	list_del(&request->client_list);
-	request->file_priv = NULL;
+	if (request->file_priv) {
+		list_del(&request->client_list);
+		request->file_priv = NULL;
+	}
 	spin_unlock(&file_priv->mm.lock);
 }
 
@@ -4043,8 +4045,10 @@  void i915_gem_release(struct drm_device *dev, struct drm_file *file)
 		request = list_first_entry(&file_priv->mm.request_list,
 					   struct drm_i915_gem_request,
 					   client_list);
-		list_del(&request->client_list);
-		request->file_priv = NULL;
+		if (request->file_priv) {
+			list_del(&request->client_list);
+			request->file_priv = NULL;
+		}
 	}
 	spin_unlock(&file_priv->mm.lock);
 }