diff options
author | James Smart <jsmart2021@gmail.com> | 2019-05-06 17:26:49 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-22 08:18:23 +0200 |
commit | da51a322f197bf62736eba3f8c8151b5d2743903 (patch) | |
tree | d76ddaef22ed1c3956eb93457ad3abc1314ee633 | |
parent | 3a2ff1088c2ac31547524c4635777edb662a59fd (diff) | |
download | linux-stable-da51a322f197bf62736eba3f8c8151b5d2743903.tar.gz linux-stable-da51a322f197bf62736eba3f8c8151b5d2743903.tar.bz2 linux-stable-da51a322f197bf62736eba3f8c8151b5d2743903.zip |
scsi: lpfc: add check for loss of ndlp when sending RRQ
[ Upstream commit c8cb261a072c88ca1aff0e804a30db4c7606521b ]
There was a missing qualification of a valid ndlp structure when calling to
send an RRQ for an abort. Add the check.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Tested-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 398c9a0a5ade..82a690924f5e 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c @@ -6498,7 +6498,10 @@ int lpfc_send_rrq(struct lpfc_hba *phba, struct lpfc_node_rrq *rrq) { struct lpfc_nodelist *ndlp = lpfc_findnode_did(rrq->vport, - rrq->nlp_DID); + rrq->nlp_DID); + if (!ndlp) + return 1; + if (lpfc_test_rrq_active(phba, ndlp, rrq->xritag)) return lpfc_issue_els_rrq(rrq->vport, ndlp, rrq->nlp_DID, rrq); |