]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
drm/i915: take struct mutex around fb unref
authorJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 11 Feb 2009 21:28:14 +0000 (13:28 -0800)
committerDave Airlie <airlied@redhat.com>
Fri, 20 Feb 2009 02:21:13 +0000 (12:21 +1000)
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>
drivers/gpu/drm/i915/intel_display.c

index 13f9b6667c94a336647ed618a9c2ba260828aeef..4d2baf7b00be43b8ec33a8f1511b0dbef988575f 100644 (file)
@@ -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;
        }