[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAD=FV=Xua_hyjtK6abQUQE=ieV5LL4K8ToWx==FAhEpiZgZecA@mail.gmail.com>
Date: Mon, 19 Oct 2015 09:36:26 -0700
From: Doug Anderson <dianders@...omium.org>
To: John Youn <John.Youn@...opsys.com>
Cc: "balbi@...com" <balbi@...com>, Yunzhi Li <lyz@...k-chips.com>,
Heiko Stübner <heiko@...ech.de>,
"linux-rockchip@...ts.infradead.org"
<linux-rockchip@...ts.infradead.org>,
Julius Werner <jwerner@...omium.org>,
"gregory.herrero@...el.com" <gregory.herrero@...el.com>,
"yousaf.kaukab@...el.com" <yousaf.kaukab@...el.com>,
"dinguyen@...nsource.altera.com" <dinguyen@...nsource.altera.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4] usb: dwc2: host: Fix use after free w/ simultaneous irqs
John,
On Fri, Oct 16, 2015 at 9:14 PM, John Youn <John.Youn@...opsys.com> wrote:
> I reviewed this some more and I think this should be ok. Most of
> the handlers don't make sense without a qtd and/or channel.
>
> Although I am not completely sure on the desc dma case. I think
> it will at least be better than letting the use-after-free occur.
>
>
> Acked-by: John Youn <johnyoun@...opsys.com>
Thanks!
I put some code in to give a stack crawl for the cause of the NULL
"qh" case. I'm running with Gregory Herrero's Descriptor DMA series.
NULL case only happens if I move "dma_desc_enable" and
"dma_desc_fs_enable" away from 0 (right now Rockchip is hardcoded to
have dma_desc off).
--
kgdb shows:
#0 0xc0198728 in arch_kgdb_breakpoint () at
arch/arm/include/asm/outercache.h:103
#1 kgdb_breakpoint () at kernel/debug/debug_core.c:1054
#2 0xc0462dcc in dwc2_release_channel_ddma
(hsotg=hsotg@...ry=0xed426058, qh=qh@...ry=0xed682280) at
drivers/usb/dwc2/hcd_ddma.c:318
...AKA on "chan->qh = NULL;"
#3 0xc0463f48 in dwc2_hcd_complete_xfer_ddma
(hsotg=hsotg@...ry=0xed426058, chan=chan@...ry=0xed531a40,
chnum=chnum@...ry=0,
halt_status=halt_status@...ry=DWC2_HC_XFER_COMPLETE)
at drivers/usb/dwc2/hcd_ddma.c:1351
#4 0xc0460414 in dwc2_hc_xfercomp_intr (hsotg=hsotg@...ry=0xed426058,
chan=chan@...ry=0xed531a40, chnum=chnum@...ry=0,
qtd=qtd@...ry=0xed66cc00)
at drivers/usb/dwc2/hcd_intr.c:1002
#5 0xc0461814 in dwc2_hc_chhltd_intr_dma (qtd=0xed66cc00, chnum=0,
chan=0xed531a40, hsotg=0xed426058) at drivers/usb/dwc2/hcd_intr.c:1830
#6 dwc2_hc_chhltd_intr (qtd=0xed66cc00, chnum=0, chan=0xed531a40,
hsotg=0xed426058) at drivers/usb/dwc2/hcd_intr.c:1951
#7 dwc2_hc_n_intr (chnum=0, hsotg=0xed426058) at
drivers/usb/dwc2/hcd_intr.c:2063
...AKA on "dwc2_hc_chhltd_intr(hsotg, chan, chnum, qtd);"
#8 dwc2_hc_intr (hsotg=0xed426058) at drivers/usb/dwc2/hcd_intr.c:2138
#9 dwc2_handle_hcd_intr (hsotg=0xed426058) at drivers/usb/dwc2/hcd_intr.c:2188
#10 0xc045c22c in _dwc2_hcd_irq (hcd=<optimized out>) at
drivers/usb/dwc2/hcd.c:2895
#11 0xc044752c in usb_hcd_irq (irq=<optimized out>, __hcd=<optimized
out>) at drivers/usb/core/hcd.c:2353
-Doug
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists