Skip to content

Commit b34b3cb

Browse files
kwachowsgregkh
authored andcommitted
accel/ivpu: Correct mutex unlock order in job submission
[ Upstream commit 75680b7 ] 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 63e7552 commit b34b3cb

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
@@ -646,8 +646,8 @@ static int ivpu_job_submit(struct ivpu_job *job, u8 priority)
646646
err_erase_xa:
647647
xa_erase(&vdev->submitted_jobs_xa, job->job_id);
648648
err_unlock:
649-
mutex_unlock(&vdev->submitted_jobs_lock);
650649
mutex_unlock(&file_priv->lock);
650+
mutex_unlock(&vdev->submitted_jobs_lock);
651651
ivpu_rpm_put(vdev);
652652
return ret;
653653
}

0 commit comments

Comments
 (0)