]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: use the unlocked drm_gem_object_put
authorEmil Velikov <emil.velikov@collabora.com>
Fri, 15 May 2020 09:50:47 +0000 (10:50 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 19 May 2020 21:31:24 +0000 (22:31 +0100)
The driver does not hold struct_mutex, thus using the locked version of
the helper is incorrect.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Fixes: a39414716ca0 ("drm/amdgpu: add independent DMA-buf import v9")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-8-emil.l.velikov@gmail.com
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c

index 43d8ed7dbd0018d66192e43f487f5aadc814fc4c..652c57a3b847836be44cca7be9587f08dbd94fe5 100644 (file)
@@ -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);
        }