drm/vgem: add missing mutex_destroy
authorMaíra Canal <mcanal@igalia.com>
Thu, 2 Feb 2023 12:55:17 +0000 (09:55 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:07 +0000 (23:03 +0900)
commit6bd38a1454d9ddbc7c76d8bbb4627ece5b707be7
tree12851fd6c1b0f30a5a974bfbb1a33e8a725f4862
parent46473f3bd14a8d6887d2ee56c78aff682bf5d596
drm/vgem: add missing mutex_destroy

[ Upstream commit 7c18189b14b33c1fbf76480b1bd217877c086e67 ]

vgem_fence_open() instantiates a mutex for a particular fence
instance, but never destroys it by calling mutex_destroy() in
vgem_fence_close().

So, add the missing mutex_destroy() to guarantee proper resource
destruction.

Fixes: 407779848445 ("drm/vgem: Attach sw fences to exported vGEM dma-buf (ioctl)")
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Maíra Canal <mairacanal@riseup.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20230202125517.427976-1-mcanal@igalia.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vgem/vgem_fence.c