[PATCH 2/2] drm/xe: Drop VM dma-resv lock on xe_sync_in_fence_get failure in exec IOCTL

Lucas De Marchi lucas.demarchi at intel.com
Tue Nov 5 20:55:29 UTC 2024


On Mon, Nov 04, 2024 at 08:35:24PM -0800, Matthew Brost wrote:
>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: stable <stable at kernel.org>
>Signed-off-by: Matthew Brost <matthew.brost at intel.com>


Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

Lucas De Marchi

>---
> 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 6de12f91b865..756b492f13b0 100644
>--- a/drivers/gpu/drm/xe/xe_exec.c
>+++ b/drivers/gpu/drm/xe/xe_exec.c
>@@ -224,6 +224,7 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
> 			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++)
>-- 
>2.34.1
>


More information about the Intel-xe mailing list