summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_els.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2014-09-03 12:57:19 -0400
committerChristoph Hellwig <hch@lst.de>2014-09-16 09:10:10 -0700
commit12838e74f5164054fd7d5f5201a846ebb9755471 (patch)
treebc4a17eba4e0670723735ebf1701ea0bcc97ef58 /drivers/scsi/lpfc/lpfc_els.c
parent2f6fa2c911167e7a3fda130689a36f55b39ed86d (diff)
downloadblackbird-op-linux-12838e74f5164054fd7d5f5201a846ebb9755471.tar.gz
blackbird-op-linux-12838e74f5164054fd7d5f5201a846ebb9755471.zip
lpfc: fix race between LOGO/PLOGI handling causing NULL pointer
Fix race between LOGO/PLOGI handling causing NULL pointer Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_els.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index 30ec80f32d1a..9d03e7250fb4 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -6693,6 +6693,13 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
phba->fc_stat.elsRcvFrame++;
+ /*
+ * Do not process any unsolicited ELS commands
+ * if the ndlp is in DEV_LOSS
+ */
+ if (ndlp->nlp_add_flag & NLP_IN_DEV_LOSS)
+ goto dropit;
+
elsiocb->context1 = lpfc_nlp_get(ndlp);
elsiocb->vport = vport;
OpenPOWER on IntegriCloud