All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][REPOST] lpfc: Fix dma virtual address ptr assignment in bsg
@ 2021-04-21 23:44 James Smart
  2021-04-27  3:07 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: James Smart @ 2021-04-21 23:44 UTC (permalink / raw)
  To: linux-scsi; +Cc: James Smart, Justin Tee

lpfc_bsg_ct_unsol_event routine acts assigns a ct_request to the
wrong structure address, resulting in a bad address that results
in bsg related timeouts.

Correct the ct_request assignment to use the kernel virtual buffer
address (not the control structure address).

Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>

---
 drivers/scsi/lpfc/lpfc_bsg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index c2776b88d493..38cfe1bc6a4d 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -934,7 +934,7 @@ lpfc_bsg_ct_unsol_event(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
 	INIT_LIST_HEAD(&head);
 	list_add_tail(&head, &piocbq->list);
 
-	ct_req = (struct lpfc_sli_ct_request *)bdeBuf1;
+	ct_req = (struct lpfc_sli_ct_request *)bdeBuf1->virt;
 	evt_req_id = ct_req->FsType;
 	cmd = ct_req->CommandResponse.bits.CmdRsp;
 
-- 
2.26.2


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

* Re: [PATCH][REPOST] lpfc: Fix dma virtual address ptr assignment in bsg
  2021-04-21 23:44 [PATCH][REPOST] lpfc: Fix dma virtual address ptr assignment in bsg James Smart
@ 2021-04-27  3:07 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-04-27  3:07 UTC (permalink / raw)
  To: linux-scsi, James Smart; +Cc: Martin K . Petersen, Justin Tee

On Wed, 21 Apr 2021 16:44:48 -0700, James Smart wrote:

> lpfc_bsg_ct_unsol_event routine acts assigns a ct_request to the
> wrong structure address, resulting in a bad address that results
> in bsg related timeouts.
> 
> Correct the ct_request assignment to use the kernel virtual buffer
> address (not the control structure address).

Applied to 5.13/scsi-fixes, thanks!

[1/1] lpfc: Fix dma virtual address ptr assignment in bsg
      https://git.kernel.org/mkp/scsi/c/83adbba746d1

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-04-27  3:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 23:44 [PATCH][REPOST] lpfc: Fix dma virtual address ptr assignment in bsg James Smart
2021-04-27  3:07 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.