From: James Smart <jsmart2021@gmail.com>
Date: Thu, 15 Jun 2017 22:56:41 -0700
Subject: scsi: lpfc: Fix system panic when express lane enabled.
Patch-mainline: v4.13-rc1
Git-commit: d41b65bcdc43fed82ea6b3c006a268df6c53e80d
References: bsc#1050239,FATE#322918
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>
Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
---
drivers/scsi/lpfc/lpfc_sli.c | 3 +++
1 file changed, 3 insertions(+)
--- 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
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);