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 <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Jesse Barnes 2009-02-11 13:28:14 -08:00 committed by Dave Airlie
parent 43565a0648
commit 496818f08a
1 changed files with 2 additions and 0 deletions

View File

@ -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;
} }