summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2017-06-15 22:56:41 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-19 21:39:01 -0400
commitd41b65bcdc43fed82ea6b3c006a268df6c53e80d (patch)
treee089eaf58cdeec2b3b5c6a6717009ff995b4b579 /drivers/scsi/lpfc
parentd30ff2632333dab794d3be14e16ca8c42dfc294d (diff)
downloadlinux-stable-d41b65bcdc43fed82ea6b3c006a268df6c53e80d.tar.gz
linux-stable-d41b65bcdc43fed82ea6b3c006a268df6c53e80d.tar.bz2
linux-stable-d41b65bcdc43fed82ea6b3c006a268df6c53e80d.zip
scsi: lpfc: Fix system panic when express lane enabled.
There is a null pointer dereference that can happen in the FOF interrupt handler. The driver was not setting up cq->assoc_qp_for sli4_hba->oas_cq. Initialize cq->assoc_qp before accessing it. Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 040575adf9c6..4f2cc395597e 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -13560,6 +13560,9 @@ lpfc_sli4_fof_handle_eqe(struct lpfc_hba *phba, struct lpfc_eqe *eqe)
return;
}
+ /* Save EQ associated with this CQ */
+ cq->assoc_qp = phba->sli4_hba.fof_eq;
+
/* Process all the entries to the OAS CQ */
while ((cqe = lpfc_sli4_cq_get(cq))) {
workposted |= lpfc_sli4_fp_handle_cqe(phba, cq, cqe);