Commit 9e7aacd8 authored by Matthew Brost's avatar Matthew Brost
Browse files

drm/xe: Ensure all locks released in exec IOCTL



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@intel.com>
Fixes: d16ef1a1 ("drm/xe/exec: Switch hw engine group execution mode upon job submission")
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarFrancois Dugast <francois.dugast@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241106224944.30130-1-matthew.brost@intel.com
parent 44e21ea6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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) {