Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1531290
| From | Christian König <deathsimple@vodafone.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL context |
| Date | 2016-11-28 14:00 +0100 |
| Message-ID | <sItHj-2cp-7@gated-at.bofh.it> (permalink) |
| References | <sIteh-22H-3@gated-at.bofh.it> <sIteh-22H-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Am 28.11.2016 um 13:20 schrieb Nicolai Hähnle:
> From: Nicolai Hähnle <Nicolai.Haehnle@amd.com>
>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Maarten Lankhorst <dev@mblankhorst.nl>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Nicolai Hähnle <Nicolai.Haehnle@amd.com>
> ---
> drivers/gpu/drm/vgem/vgem_fence.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/vgem/vgem_fence.c b/drivers/gpu/drm/vgem/vgem_fence.c
> index 488909a..e1d516f 100644
> --- a/drivers/gpu/drm/vgem/vgem_fence.c
> +++ b/drivers/gpu/drm/vgem/vgem_fence.c
> @@ -191,12 +191,12 @@ int vgem_fence_attach_ioctl(struct drm_device *dev,
>
> /* Expose the fence via the dma-buf */
> ret = 0;
> - mutex_lock(&resv->lock.base);
> + ww_mutex_lock(&resv->lock.base, NULL);
Accessing the base member here is probably superfluous now and will most
likely raise a warning.
Christian.
> if (arg->flags & VGEM_FENCE_WRITE)
> reservation_object_add_excl_fence(resv, fence);
> else if ((ret = reservation_object_reserve_shared(resv)) == 0)
> reservation_object_add_shared_fence(resv, fence);
> - mutex_unlock(&resv->lock.base);
> + ww_mutex_unlock(&resv->lock.base);
>
> /* Record the fence in our idr for later signaling */
> if (ret == 0) {
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL context Nicolai Hähnle <nhaehnle@gmail.com> - 2016-11-28 13:30 +0100
Re: [PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL context Maarten Lankhorst <dev@mblankhorst.nl> - 2016-11-28 13:50 +0100
Re: [PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL context Peter Zijlstra <peterz@infradead.org> - 2016-11-28 14:00 +0100
Re: [PATCH 01/11] drm/vgem: Use ww_mutex_(un)lock even with a NULL context Christian König <deathsimple@vodafone.de> - 2016-11-28 14:00 +0100
csiph-web