From: Jesse Barnes Date: Wed, 11 Feb 2009 21:28:14 +0000 (-0800) Subject: drm/i915: take struct mutex around fb unref X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=496818f08a78476abdb307e241911536221239fc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/i915: take struct mutex around fb unref Need to do this in case the unref ends up doing a free. Signed-off-by: Jesse Barnes Signed-off-by: Eric Anholt Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 13f9b6667c94..4d2baf7b00be 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1606,7 +1606,9 @@ intel_user_framebuffer_create(struct drm_device *dev, ret = intel_framebuffer_create(dev, mode_cmd, &fb, obj); if (ret) { + mutex_lock(&dev->struct_mutex); drm_gem_object_unreference(obj); + mutex_unlock(&dev->struct_mutex); return NULL; }