From: Eric Anholt Date: Mon, 9 Nov 2009 22:57:34 +0000 (-0800) Subject: drm/i915: Correct locking in the modesetting failure path, fixing a BUG_ON. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=21099537dbacc5c8999d833e6bfd1b72edd89189;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git drm/i915: Correct locking in the modesetting failure path, fixing a BUG_ON. Signed-off-by: Eric Anholt --- diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 7bfded5e90bb..281faca3e37c 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; }