diff mbox

scsi: lpfc: double lock typo in lpfc_ns_rsp()

Message ID 20170503212215.m2t2rfrkoktugkg4@mwanda (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Dan Carpenter May 3, 2017, 9:22 p.m. UTC
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>

Comments

James Smart May 3, 2017, 9:46 p.m. UTC | #1
On 5/3/2017 2:22 PM, Dan Carpenter wrote:
> 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>
>
> diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
>
Yep. looks good

Reviewed-by: James Smart <james.smart@broadcom.com>
Martin K. Petersen May 9, 2017, 1:51 a.m. UTC | #2
Dan,

> There is a double lock bug here so this will deadlock instead of
> unlocking.

Applied to 4.12/scsi-fixes.
diff mbox

Patch

diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index 1487406aea77..c7962dae4dab 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -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);
 		}
 	}