From: James Smart Date: Wed, 28 Aug 2019 23:19:11 +0000 (-0700) Subject: scsi: lpfc: fix 12.4.0.0 GPF at boot X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=01f2ef6d18e70c92bbf3743be4b908f52a059263;p=linux.git scsi: lpfc: fix 12.4.0.0 GPF at boot The 12.4.0.0 patch that merged WQ/CQ pairs into single per-cpu pair contained a bug: a local variable was set to the queue pair by index. This should have allowed the local variable to be natively used. Instead, the code reused the index relative to the local variable, obtaining a random pointer value that when used eventually faulted the system Convert offending code to use local variable. Fixes: c00f62e6c546 ("scsi: lpfc: Merge per-protocol WQ/CQ pairs into single per-cpu pair") Signed-off-by: Dick Kennedy Signed-off-by: James Smart Tested-by: Abdul Haleem Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 0dfd30aa4d992..bb5705267c395 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -5553,7 +5553,7 @@ lpfc_sli4_arm_cqeq_intr(struct lpfc_hba *phba) for (qidx = 0; qidx < phba->cfg_hdw_queue; qidx++) { qp = &sli4_hba->hdwq[qidx]; /* ARM the corresponding CQ */ - sli4_hba->sli4_write_cq_db(phba, qp[qidx].io_cq, 0, + sli4_hba->sli4_write_cq_db(phba, qp->io_cq, 0, LPFC_QUEUE_REARM); }