drm/udl: Use unlocked gem unreferencing
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 30 Mar 2016 09:40:43 +0000 (11:40 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 30 Apr 2016 22:06:07 +0000 (00:06 +0200)
commit 72b9ff0612ad8fc969b910cd00ac16b57a1a9ba4 upstream.

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 ef4c6270bf2867e2f8032e9614d1a8cfc6c71663
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: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/udl/udl_fb.c
drivers/gpu/drm/udl/udl_gem.c

index 377176372da893e79b7c108b15cb73f18d8adb9a..8cd50da22c7efaaa53e4c1fa34e0aa4085845d86 100644 (file)
@@ -545,7 +545,7 @@ static int udlfb_create(struct drm_fb_helper *helper,
 
        return ret;
 out_gfree:
-       drm_gem_object_unreference(&ufbdev->ufb.obj->base);
+       drm_gem_object_unreference_unlocked(&ufbdev->ufb.obj->base);
 out:
        return ret;
 }
index c041cd73f3999a49234cfea09319822757f358ad..fd6dc1f9b3b189232f598d076718a9b3ec795afe 100644 (file)
@@ -51,7 +51,7 @@ udl_gem_create(struct drm_file *file,
                return ret;
        }
 
-       drm_gem_object_unreference(&obj->base);
+       drm_gem_object_unreference_unlocked(&obj->base);
        *handle_p = handle;
        return 0;
 }