]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
drm/i915: hold mutex for unreference() in i915_gem_tiling.c
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 8 Feb 2009 19:07:51 +0000 (19:07 +0000)
committerDave Airlie <airlied@redhat.com>
Fri, 20 Feb 2009 02:21:09 +0000 (12:21 +1000)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/gpu/drm/i915/i915_gem_tiling.c

index fa1685cba8402fdbd456be37f627bd21c170cca4..7fb4191ef934c2b9a9549a36737e075d6ee3fca7 100644 (file)
@@ -299,9 +299,8 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
        }
        obj_priv->stride = args->stride;
 
-       mutex_unlock(&dev->struct_mutex);
-
        drm_gem_object_unreference(obj);
+       mutex_unlock(&dev->struct_mutex);
 
        return 0;
 }
@@ -340,9 +339,8 @@ i915_gem_get_tiling(struct drm_device *dev, void *data,
                DRM_ERROR("unknown tiling mode\n");
        }
 
-       mutex_unlock(&dev->struct_mutex);
-
        drm_gem_object_unreference(obj);
+       mutex_unlock(&dev->struct_mutex);
 
        return 0;
 }