[PATCH] drm/xe: Ensure all locks released in exec IOCTL
Francois Dugast
francois.dugast at intel.com
Thu Nov 7 09:17:23 UTC 2024
On Wed, Nov 06, 2024 at 02:49:44PM -0800, Matthew Brost wrote:
> In couple of places the wrong error handling goto was used to release
> locks. Fix these to ensure all locks dropped on exec IOCTL errors.
>
> Cc: Francois Dugast <francois.dugast at intel.com>
> Fixes: d16ef1a18e39 ("drm/xe/exec: Switch hw engine group execution mode upon job submission")
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>
Reviewed-by: Francois Dugast <francois.dugast at intel.com>
> ---
> drivers/gpu/drm/xe/xe_exec.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_exec.c b/drivers/gpu/drm/xe/xe_exec.c
> index 756b492f13b0..31cca938956f 100644
> --- a/drivers/gpu/drm/xe/xe_exec.c
> +++ b/drivers/gpu/drm/xe/xe_exec.c
> @@ -203,14 +203,14 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
> write_locked = false;
> }
> if (err)
> - goto err_syncs;
> + goto err_hw_exec_mode;
>
> if (write_locked) {
> err = xe_vm_userptr_pin(vm);
> downgrade_write(&vm->lock);
> write_locked = false;
> if (err)
> - goto err_hw_exec_mode;
> + goto err_unlock_list;
> }
>
> if (!args->num_batch_buffer) {
> --
> 2.34.1
>
More information about the Intel-xe
mailing list