Re: [PATCH] usb: musb: Fix potential NULL dereference

2019-01-26 Thread Matwey V. Kornilov
сб, 26 янв. 2019 г. в 00:37, Alan Stern : > > On Fri, 25 Jan 2019, Bin Liu wrote: > > > On Thu, Jan 24, 2019 at 09:47:02PM +0300, Matwey V. Kornilov wrote: > > > By the way, why do we need to store the qh in urb->hcpriv? > > > qh can always be accessible through urb->ep->hcpriv > > > Wouldn't it

Re: [PATCH] usb: musb: Fix potential NULL dereference

2019-01-25 Thread Alan Stern
On Fri, 25 Jan 2019, Bin Liu wrote: > On Thu, Jan 24, 2019 at 09:47:02PM +0300, Matwey V. Kornilov wrote: > > By the way, why do we need to store the qh in urb->hcpriv? > > qh can always be accessible through urb->ep->hcpriv > > Wouldn't it be better to drop entire urb->hcpriv usage? > > I am

Re: [PATCH] usb: musb: Fix potential NULL dereference

2019-01-25 Thread Bin Liu
On Thu, Jan 24, 2019 at 09:47:02PM +0300, Matwey V. Kornilov wrote: > By the way, why do we need to store the qh in urb->hcpriv? > qh can always be accessible through urb->ep->hcpriv > Wouldn't it be better to drop entire urb->hcpriv usage? I am not sure why. The code is there since the first

Re: [PATCH] usb: musb: Fix potential NULL dereference

2019-01-25 Thread Bin Liu
On Wed, Jan 23, 2019 at 08:51:42PM +0300, Matwey V. Kornilov wrote: > We assign "urb->hcpriv = qh;" a few lines down. The valid qh for the urb is > hep->hcpriv in this code path. > > Fixes: 714bc5ef3eda ("musb: potential use after free") > Signed-off-by: Matwey V. Kornilov > --- >

Re: [PATCH] usb: musb: Fix potential NULL dereference

2019-01-24 Thread Matwey V. Kornilov
By the way, why do we need to store the qh in urb->hcpriv? qh can always be accessible through urb->ep->hcpriv Wouldn't it be better to drop entire urb->hcpriv usage? ср, 23 янв. 2019 г. в 20:52, Matwey V. Kornilov : > > We assign "urb->hcpriv = qh;" a few lines down. The valid qh for the urb is

[PATCH] usb: musb: Fix potential NULL dereference

2019-01-23 Thread Matwey V. Kornilov
We assign "urb->hcpriv = qh;" a few lines down. The valid qh for the urb is hep->hcpriv in this code path. Fixes: 714bc5ef3eda ("musb: potential use after free") Signed-off-by: Matwey V. Kornilov --- drivers/usb/musb/musb_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git