Skip to contentSkip to conversation

target_core_user: fix double unlock

PATCH Applied Mike Christie 1 participant 1 message Jul 23, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/9 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.

---
 drivers/target/target_core_user.c | 1 -
 1 file changed, 1 deletion(-)
drivers/target/target_core_user.c +0 -1
index 847707a..fafe65f 100644
@@ -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;
Signature · 1 line
1.8.3.1