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

Upadhyay, Tejas tejas.upadhyay at intel.com
Tue Nov 5 06:47:17 UTC 2024



> -----Original Message-----
> From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of
> Matthew Brost
> Sent: Tuesday, November 5, 2024 10:05 AM
> To: intel-xe at lists.freedesktop.org
> Subject: [PATCH 2/2] drm/xe: Drop VM dma-resv lock on
> xe_sync_in_fence_get failure in exec IOCTL
> 
> 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>
> ---
>  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);

LGTM,
Reviewed-by: Tejas Upadhyay <tejas.upadhyay at intel.com>

>  				goto err_unlock_list;
>  			}
>  			for (i = 0; i < num_syncs; i++)
> --
> 2.34.1



More information about the Intel-xe mailing list