linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lpfc: fix 12.4.0.0 GPF at boot
@ 2019-08-28 23:19 James Smart
  2019-08-29 22:15 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: James Smart @ 2019-08-28 23:19 UTC (permalink / raw)
  To: linux-scsi; +Cc: James Smart, Dick Kennedy

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 <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Tested-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>

---
Offending patch and this patch are in 5.4/scsi-queue branch.
---
 drivers/scsi/lpfc/lpfc_sli.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 0dfd30aa4d99..bb5705267c39 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);
 		}
 
-- 
2.13.7


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] lpfc: fix 12.4.0.0 GPF at boot
  2019-08-28 23:19 [PATCH] lpfc: fix 12.4.0.0 GPF at boot James Smart
@ 2019-08-29 22:15 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2019-08-29 22:15 UTC (permalink / raw)
  To: James Smart; +Cc: linux-scsi, Dick Kennedy


James,

> 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.

Applied to 5.4/scsi-queue. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-29 22:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28 23:19 [PATCH] lpfc: fix 12.4.0.0 GPF at boot James Smart
2019-08-29 22:15 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).