mirror of
https://github.com/torvalds/linux.git
synced 2026-05-21 05:18:45 +02:00
drm/xe: unlock on error path in xe_vm_add_compute_exec_queue()
Drop the "&vm->lock" before returning. Fixes:24f947d58f("drm/xe: Use DRM GPUVM helpers for external- and evicted objects") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> (cherry picked from commitcf46019e85) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
This commit is contained in:
parent
616576df35
commit
ec32f4f1be
|
|
@ -335,13 +335,13 @@ int xe_vm_add_compute_exec_queue(struct xe_vm *vm, struct xe_exec_queue *q)
|
|||
down_write(&vm->lock);
|
||||
err = drm_gpuvm_exec_lock(&vm_exec);
|
||||
if (err)
|
||||
return err;
|
||||
goto out_up_write;
|
||||
|
||||
pfence = xe_preempt_fence_create(q, q->compute.context,
|
||||
++q->compute.seqno);
|
||||
if (!pfence) {
|
||||
err = -ENOMEM;
|
||||
goto out_unlock;
|
||||
goto out_fini;
|
||||
}
|
||||
|
||||
list_add(&q->compute.link, &vm->preempt.exec_queues);
|
||||
|
|
@ -364,8 +364,9 @@ int xe_vm_add_compute_exec_queue(struct xe_vm *vm, struct xe_exec_queue *q)
|
|||
|
||||
up_read(&vm->userptr.notifier_lock);
|
||||
|
||||
out_unlock:
|
||||
out_fini:
|
||||
drm_exec_fini(exec);
|
||||
out_up_write:
|
||||
up_write(&vm->lock);
|
||||
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user