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:
parent
43565a0648
commit
496818f08a
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue