Skip to content

Commit 75680b7

Browse files
kwachowsjlawryno
authored andcommitted
accel/ivpu: Correct mutex unlock order in job submission
The mutex unlock for vdev->submitted_jobs_lock was incorrectly placed before unlocking file_priv->lock. Change order of unlocks to avoid potential race conditions. Fixes: 5bbccad ("accel/ivpu: Abort all jobs after command queue unregister") Signed-off-by: Karol Wachowski <karol.wachowski@intel.com> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Link: https://lore.kernel.org/r/20250425093656.2228168-1-jacek.lawrynowicz@linux.intel.com
1 parent f2ecc70 commit 75680b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/accel/ivpu/ivpu_job.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,8 @@ static int ivpu_job_submit(struct ivpu_job *job, u8 priority, u32 cmdq_id)
681681
err_erase_xa:
682682
xa_erase(&vdev->submitted_jobs_xa, job->job_id);
683683
err_unlock:
684-
mutex_unlock(&vdev->submitted_jobs_lock);
685684
mutex_unlock(&file_priv->lock);
685+
mutex_unlock(&vdev->submitted_jobs_lock);
686686
ivpu_rpm_put(vdev);
687687
return ret;
688688
}

0 commit comments

Comments
 (0)