summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c
diff options
context:
space:
mode:
authorYoungJun Cho <yj44.cho@samsung.com>2013-06-27 08:39:58 +0900
committerInki Dae <inki.dae@samsung.com>2014-10-15 20:05:15 +0900
commit9832709c7a9968f213d321e0798a2039237c44f2 (patch)
tree3c31e925002a8a58ec13b72450e87b334c7ea5a3 /drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c
parent02a1c058be67fb93b7ae5ff8eab0b84f0f076919 (diff)
downloadlinux-3.10-9832709c7a9968f213d321e0798a2039237c44f2.tar.gz
linux-3.10-9832709c7a9968f213d321e0798a2039237c44f2.tar.bz2
linux-3.10-9832709c7a9968f213d321e0798a2039237c44f2.zip
drm/gem: add mutex lock when using drm_gem_mmap_obj
The drm_gem_mmap_obj() has to be protected with dev->struct_mutex, but some caller functions do not. So it adds mutex lock to missing callers and adds assertion to check whether drm_gem_mmap_obj() is called with mutex lock or not. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Conflicts: drivers/gpu/drm/drm_gem_cma_helper.c drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c Change-Id: Icb683c218b3455f113c073c33166faab5a7fcc4c
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c
index be7cd97a0db..6d5ae6b5d2b 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c
@@ -144,6 +144,7 @@ static int omap_gem_dmabuf_mmap(struct dma_buf *buffer,
struct vm_area_struct *vma)
{
struct drm_gem_object *obj = buffer->priv;
+ struct drm_device *dev = obj->dev;
int ret = 0;
if (WARN_ON(!obj->filp))