summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-01-24 03:33:46 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-02-07 02:11:58 +0300
commit50dbd09c56db0555813aa2824dc4fe8f1fc06aaa (patch)
tree6493e73e87d76af72d3b101fc6984f89c0269640
parentf5572475e999a1e9cd44f8704023a815f611d377 (diff)
downloadlinux-50dbd09c56db0555813aa2824dc4fe8f1fc06aaa.tar.xz
scsi: qla2xxx: Fix a locking imbalance in qlt_24xx_handle_els()
Ensure that upon return the tgt->ha->tgt.sess_lock spin lock is unlocked no matter which code path is taken through this function. This was detected by sparse. Fixes: 82abdcaf3ede ("scsi: qla2xxx: Allow target mode to accept PRLI in dual mode") Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Himanshu Madhani <himanshu.madhani@cavium.com> Cc: Quinn Tran <quinn.tran@cavium.com> Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/qla2xxx/qla_target.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index fc89af8fe256..896b2d8bd803 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -4871,8 +4871,6 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha,
sess);
qlt_send_term_imm_notif(vha, iocb, 1);
res = 0;
- spin_lock_irqsave(&tgt->ha->tgt.sess_lock,
- flags);
break;
}