diff options
author | James Smart <james.smart@emulex.com> | 2014-09-03 18:57:19 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-09-16 18:10:10 +0200 |
commit | 12838e74f5164054fd7d5f5201a846ebb9755471 (patch) | |
tree | bc4a17eba4e0670723735ebf1701ea0bcc97ef58 /drivers/scsi/lpfc/lpfc_els.c | |
parent | lpfc: fix IP Reset processing - wait for RDY before proceeding (diff) | |
download | linux-12838e74f5164054fd7d5f5201a846ebb9755471.tar.xz 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.c | 7 |
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; |