Skip to content

Commit

Permalink
drm/i915: take struct mutex around fb unref
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesse Barnes authored and Dave Airlie committed Feb 20, 2009
1 parent 43565a0 commit 496818f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 496818f

Please sign in to comment.