Skip to content

Commit eed04fa

Browse files
Minas Harutyunyangregkh
authored andcommitted
usb: dwc2: host: Fix dereference issue in DDMA completion flow.
Fixed variable dereference issue in DDMA completion flow. Fixes: b258e42 ("usb: dwc2: host: Fix ISOC flow in DDMA mode") CC: stable@vger.kernel.org Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/linux-usb/2024040834-ethically-rumble-701f@gregkh/T/#m4c4b83bef0ebb4b67fe2e0a7d6466cbb6f416e39 Signed-off-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> Link: https://lore.kernel.org/r/cc826d3ef53c934d8e6d98870f17f3cdc3d2755d.1712665387.git.Minas.Harutyunyan@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3461e02 commit eed04fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/usb/dwc2/hcd_ddma.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,13 +867,15 @@ static int dwc2_cmpl_host_isoc_dma_desc(struct dwc2_hsotg *hsotg,
867867
struct dwc2_dma_desc *dma_desc;
868868
struct dwc2_hcd_iso_packet_desc *frame_desc;
869869
u16 frame_desc_idx;
870-
struct urb *usb_urb = qtd->urb->priv;
870+
struct urb *usb_urb;
871871
u16 remain = 0;
872872
int rc = 0;
873873

874874
if (!qtd->urb)
875875
return -EINVAL;
876876

877+
usb_urb = qtd->urb->priv;
878+
877879
dma_sync_single_for_cpu(hsotg->dev, qh->desc_list_dma + (idx *
878880
sizeof(struct dwc2_dma_desc)),
879881
sizeof(struct dwc2_dma_desc),

0 commit comments

Comments
 (0)