Skip to content

Commit 3cd0438

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 <[email protected]> Reviewed-by: Jeff Hugo <[email protected]> Signed-off-by: Jacek Lawrynowicz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent 77cdcde commit 3cd0438

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)