scsi: lpfc: double lock typo in lpfc_ns_rsp()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 3 May 2017 21:22:16 +0000 (00:22 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 9 May 2017 01:50:16 +0000 (21:50 -0400)
There is a double lock bug here so this will deadlock instead of
unlocking.

Fixes: 1c5b12f76301 ("Fix implicit logo and RSCN handling for NVMET")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_ct.c

index 1487406aea778411476b1d95f6c454c790c559bb..c7962dae4dab8c7130dcb46fa1b7d45dac0509eb 100644 (file)
@@ -630,7 +630,7 @@ lpfc_ns_rsp(struct lpfc_vport *vport, struct lpfc_dmabuf *mp, uint8_t fc4_type,
                                                NLP_EVT_DEVICE_RECOVERY);
                        spin_lock_irq(shost->host_lock);
                        ndlp->nlp_flag &= ~NLP_NVMET_RECOV;
-                       spin_lock_irq(shost->host_lock);
+                       spin_unlock_irq(shost->host_lock);
                }
        }