lkml.org 
[lkml]   [2019]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 074/117] scsi: lpfc: add check for loss of ndlp when sending RRQ
    Date
    [ 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>
    ---
    drivers/scsi/lpfc/lpfc_els.c | 5 ++++-
    1 file changed, 4 insertions(+), 1 deletion(-)

    diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
    index 4905455bbfc7..b5be4df05733 100644
    --- a/drivers/scsi/lpfc/lpfc_els.c
    +++ b/drivers/scsi/lpfc/lpfc_els.c
    @@ -6789,7 +6789,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);
    --
    2.20.1


    \
     
     \ /
      Last update: 2019-06-20 20:07    [W:4.052 / U:0.268 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site