summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorMike Christie <mchristi@redhat.com>2018-07-23 14:07:43 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2018-07-30 23:17:53 -0400
commitf0e89aae609bebd430ce7a96d2f642917d89ca57 (patch)
treeb526b338a5969cbd82c3e57de7d772aafd88f641 /drivers/target
parent807cf197fc9a3bc156523cb68786a9cb0ec396b4 (diff)
downloadlinux-f0e89aae609bebd430ce7a96d2f642917d89ca57.tar.bz2
scsi: target_core_user: fix double unlock
The caller of queue_cmd_ring grabs and releases the lock, so the tcmu_setup_cmd_timer failure handling inside queue_cmd_ring should not call mutex_unlock. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_user.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index 847707a700cf..fafe65fd37f4 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -1066,7 +1066,6 @@ static sense_reason_t queue_cmd_ring(struct tcmu_cmd *tcmu_cmd, int *scsi_err)
&udev->cmd_timer);
if (ret) {
tcmu_cmd_free_data(tcmu_cmd, tcmu_cmd->dbi_cnt);
- mutex_unlock(&udev->cmdr_lock);
*scsi_err = TCM_OUT_OF_RESOURCES;
return -1;