diff mbox

[07/13] drm/i915: Correct locking in the modesetting failure path, fixing a BUG_ON.

Message ID 1267124996-17821-8-git-send-email-eric@anholt.net (mailing list archive)
State Accepted
Headers show

Commit Message

Eric Anholt Feb. 25, 2010, 7:09 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 7bfded5..281faca 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1405,7 +1405,9 @@  static int i915_load_modeset_init(struct drm_device *dev,
 	return 0;
 
 destroy_ringbuffer:
+	mutex_lock(&dev->struct_mutex);
 	i915_gem_cleanup_ringbuffer(dev);
+	mutex_unlock(&dev->struct_mutex);
 out:
 	return ret;
 }