Commit 7a6f7133 authored by Daniel Vetter's avatar Daniel Vetter Committed by Russell King

drm/armada: use unlocked gem unreferencing

For drm_gem_object_unreference callers are required to hold
dev->struct_mutex, which these paths don't. Enforcing this requirement
has become a bit more strict with

commit ef4c6270
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Oct 15 09:36:25 2015 +0200

    drm/gem: Check locking in drm_gem_object_unreference
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 7cb410cd
...@@ -972,7 +972,7 @@ static void armada_drm_crtc_destroy(struct drm_crtc *crtc) ...@@ -972,7 +972,7 @@ static void armada_drm_crtc_destroy(struct drm_crtc *crtc)
struct armada_private *priv = crtc->dev->dev_private; struct armada_private *priv = crtc->dev->dev_private;
if (dcrtc->cursor_obj) if (dcrtc->cursor_obj)
drm_gem_object_unreference(&dcrtc->cursor_obj->obj); drm_gem_object_unreference_unlocked(&dcrtc->cursor_obj->obj);
priv->dcrtc[dcrtc->num] = NULL; priv->dcrtc[dcrtc->num] = NULL;
drm_crtc_cleanup(&dcrtc->crtc); drm_crtc_cleanup(&dcrtc->crtc);
......
...@@ -352,13 +352,13 @@ int armada_gem_mmap_ioctl(struct drm_device *dev, void *data, ...@@ -352,13 +352,13 @@ int armada_gem_mmap_ioctl(struct drm_device *dev, void *data,
return -ENOENT; return -ENOENT;
if (!dobj->obj.filp) { if (!dobj->obj.filp) {
drm_gem_object_unreference(&dobj->obj); drm_gem_object_unreference_unlocked(&dobj->obj);
return -EINVAL; return -EINVAL;
} }
addr = vm_mmap(dobj->obj.filp, 0, args->size, PROT_READ | PROT_WRITE, addr = vm_mmap(dobj->obj.filp, 0, args->size, PROT_READ | PROT_WRITE,
MAP_SHARED, args->offset); MAP_SHARED, args->offset);
drm_gem_object_unreference(&dobj->obj); drm_gem_object_unreference_unlocked(&dobj->obj);
if (IS_ERR_VALUE(addr)) if (IS_ERR_VALUE(addr))
return addr; return addr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment