Re: [PATCH] usb/g_zero: don't access private data in complete callback on error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 23, 2012 at 12:22:20PM -0500, Alan Stern wrote:
> On Mon, 23 Jan 2012, Sebastian Andrzej Siewior wrote:
> 
> > The following scenario:
> > - use a third party tool
> > - issue SetConfiguration, start a transfer
> > - g_zero enqueues 4k reqs. Be rude and stop after a multiple of maxpacketsize
> >   but before the 4k
> > - Assume the UDC can handle 4k transfer in one go and will interrupt after the
> >   4k arrived or a short transfer. That the transfer is still "busy".
> > - now soft the disconnect the device.
> > - the UDC gets a SetConfiguration 0 and will disable all endpoints
> > - disabling an endpoint means cancles all pending transfers.
> > 
> > On DWC3 we issue a cancel transfer command and wait for the command/transfer to
> > complete.
> 
> Do you mean you _don't_ wait for the transfer to complete?
> 
> >  That means we return immediately from ->disable(). The _gadget_ has to
> > wait for the ->complete() callback. g_zero does not and the result is:
> 
> This patch is wrong; DWC3 must be fixed instead.  From 
> include/linux/usb/gadget.h:

that's correct Alan. The bug lies on dwc3, not g_zero.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux