Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: lpfc: add check for loss of ndlp when sending RRQ

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>

authored by

James Smart and committed by
Martin K. Petersen
c8cb261a 79080d34

+4 -1
+4 -1
drivers/scsi/lpfc/lpfc_els.c
··· 7334 7334 lpfc_send_rrq(struct lpfc_hba *phba, struct lpfc_node_rrq *rrq) 7335 7335 { 7336 7336 struct lpfc_nodelist *ndlp = lpfc_findnode_did(rrq->vport, 7337 - rrq->nlp_DID); 7337 + rrq->nlp_DID); 7338 + if (!ndlp) 7339 + return 1; 7340 + 7338 7341 if (lpfc_test_rrq_active(phba, ndlp, rrq->xritag)) 7339 7342 return lpfc_issue_els_rrq(rrq->vport, ndlp, 7340 7343 rrq->nlp_DID, rrq);