[PATCH 04/13] drm/udl: Use unlocked gem unreferencing
poma
pomidorabelisima at gmail.com
Wed Mar 30 10:55:06 UTC 2016
On 30.03.2016 11:40, Daniel Vetter wrote:
> 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 at ffwll.ch>
> Date: Thu Oct 15 09:36:25 2015 +0200
>
> drm/gem: Check locking in drm_gem_object_unreference
>
> Cc: Dave Airlie <airlied at redhat.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
> drivers/gpu/drm/udl/udl_fb.c | 2 +-
> drivers/gpu/drm/udl/udl_gem.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
> index 33239a2b264a..fd1eb9d03f0b 100644
> --- a/drivers/gpu/drm/udl/udl_fb.c
> +++ b/drivers/gpu/drm/udl/udl_fb.c
> @@ -536,7 +536,7 @@ static int udlfb_create(struct drm_fb_helper *helper,
> out_destroy_fbi:
> drm_fb_helper_release_fbi(helper);
> out_gfree:
> - drm_gem_object_unreference(&ufbdev->ufb.obj->base);
> + drm_gem_object_unreference_unlocked(&ufbdev->ufb.obj->base);
> out:
> return ret;
> }
> diff --git a/drivers/gpu/drm/udl/udl_gem.c b/drivers/gpu/drm/udl/udl_gem.c
> index 2a0a784ab6ee..d7528e0d8442 100644
> --- a/drivers/gpu/drm/udl/udl_gem.c
> +++ b/drivers/gpu/drm/udl/udl_gem.c
> @@ -52,7 +52,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;
> }
>
Reviewed-by: poma <pomidorabelisima at gmail.com>
More information about the dri-devel
mailing list