]>
Commit | Line | Data |
---|---|---|
2289b8c5 SL |
1 | From 8e801179e64f5e636bf838292db11f99c5b46279 Mon Sep 17 00:00:00 2001 |
2 | From: James Smart <jsmart2021@gmail.com> | |
3 | Date: Mon, 6 May 2019 17:26:49 -0700 | |
4 | Subject: scsi: lpfc: add check for loss of ndlp when sending RRQ | |
5 | ||
6 | [ Upstream commit c8cb261a072c88ca1aff0e804a30db4c7606521b ] | |
7 | ||
8 | There was a missing qualification of a valid ndlp structure when calling to | |
9 | send an RRQ for an abort. Add the check. | |
10 | ||
11 | Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> | |
12 | Signed-off-by: James Smart <jsmart2021@gmail.com> | |
13 | Tested-by: Bart Van Assche <bvanassche@acm.org> | |
14 | Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> | |
15 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
16 | --- | |
17 | drivers/scsi/lpfc/lpfc_els.c | 5 ++++- | |
18 | 1 file changed, 4 insertions(+), 1 deletion(-) | |
19 | ||
20 | diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c | |
21 | index 0d214e6b8e9a..f3c6801c0b31 100644 | |
22 | --- a/drivers/scsi/lpfc/lpfc_els.c | |
23 | +++ b/drivers/scsi/lpfc/lpfc_els.c | |
24 | @@ -7094,7 +7094,10 @@ int | |
25 | lpfc_send_rrq(struct lpfc_hba *phba, struct lpfc_node_rrq *rrq) | |
26 | { | |
27 | struct lpfc_nodelist *ndlp = lpfc_findnode_did(rrq->vport, | |
28 | - rrq->nlp_DID); | |
29 | + rrq->nlp_DID); | |
30 | + if (!ndlp) | |
31 | + return 1; | |
32 | + | |
33 | if (lpfc_test_rrq_active(phba, ndlp, rrq->xritag)) | |
34 | return lpfc_issue_els_rrq(rrq->vport, ndlp, | |
35 | rrq->nlp_DID, rrq); | |
36 | -- | |
37 | 2.20.1 | |
38 |