[PATCH 06/36] drm/amdgpu: use the unlocked drm_gem_object_put
Sam Ravnborg
sam at ravnborg.org
Thu May 7 18:03:10 UTC 2020
Hi Emil.
On Thu, May 07, 2020 at 04:07:52PM +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> The driver does not hold struct_mutex, thus using the locked version of
> the helper is incorrect.
>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Christian König <christian.koenig at amd.com>
> Cc: amd-gfx at lists.freedesktop.org
> Fixes: a39414716ca0 ("drm/amdgpu: add independent DMA-buf import v9"):
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
> index 43d8ed7dbd00..652c57a3b847 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
> @@ -587,7 +587,7 @@ struct drm_gem_object *amdgpu_gem_prime_import(struct drm_device *dev,
> attach = dma_buf_dynamic_attach(dma_buf, dev->dev,
> &amdgpu_dma_buf_attach_ops, obj);
> if (IS_ERR(attach)) {
> - drm_gem_object_put(obj);
> + drm_gem_object_put_unlocked(obj);
> return ERR_CAST(attach);
> }
Likewise previous patch.
Drop this as the patch is correct after the rename a few pathces later.
Sam
>
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
More information about the amd-gfx
mailing list