Commit 496818f0 authored by Jesse Barnes's avatar Jesse Barnes Committed by Dave Airlie

drm/i915: take struct mutex around fb unref

Need to do this in case the unref ends up doing a free.
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 43565a06
...@@ -1606,7 +1606,9 @@ intel_user_framebuffer_create(struct drm_device *dev, ...@@ -1606,7 +1606,9 @@ intel_user_framebuffer_create(struct drm_device *dev,
ret = intel_framebuffer_create(dev, mode_cmd, &fb, obj); ret = intel_framebuffer_create(dev, mode_cmd, &fb, obj);
if (ret) { if (ret) {
mutex_lock(&dev->struct_mutex);
drm_gem_object_unreference(obj); drm_gem_object_unreference(obj);
mutex_unlock(&dev->struct_mutex);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment