From 116e1efd814718f1b93cc0fbe40a4648854519cb Mon Sep 17 00:00:00 2001 From: Matthew Brost Date: Wed, 26 Feb 2025 22:49:14 +0900 Subject: [PATCH] drm/xe: Drop VM dma-resv lock on xe_sync_in_fence_get failure in exec IOCTL BugLink: https://bugs.launchpad.net/bugs/2100292 commit 64a2b6ed4bfd890a0e91955dd8ef8422a3944ed9 upstream. Upon failure all locks need to be dropped before returning to the user. Fixes: 58480c1c912f ("drm/xe: Skip VMAs pin when requesting signal to the last XE_EXEC") Cc: Signed-off-by: Matthew Brost Reviewed-by: Tejas Upadhyay Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20241105043524.4062774-3-matthew.brost@intel.com (cherry picked from commit 7d1a4258e602ffdce529f56686925034c1b3b095) Signed-off-by: Lucas De Marchi Signed-off-by: Greg Kroah-Hartman CVE-2024-53086 Signed-off-by: Koichiro Den Signed-off-by: Stefan Bader --- drivers/gpu/drm/xe/xe_exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/xe/xe_exec.c b/drivers/gpu/drm/xe/xe_exec.c index 850fd86af043..84f0b863feaa 100644 --- a/drivers/gpu/drm/xe/xe_exec.c +++ b/drivers/gpu/drm/xe/xe_exec.c @@ -205,6 +205,7 @@ retry: fence = xe_sync_in_fence_get(syncs, num_syncs, q, vm); if (IS_ERR(fence)) { err = PTR_ERR(fence); + xe_vm_unlock(vm); goto err_unlock_list; } for (i = 0; i < num_syncs; i++)