drm/i915: Correct locking in the modesetting failure path, fixing a BUG_ON.
authorEric Anholt <eric@anholt.net>
Mon, 9 Nov 2009 22:57:34 +0000 (14:57 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 26 Feb 2010 21:23:18 +0000 (13:23 -0800)
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_dma.c

index 7bfded5..281faca 100644 (file)
@@ -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;
 }