Re: [PATCH] dwc3: gadget: Introduce dwc3_endpoint_xfer_xxx() to check endpoint type

From: Felipe Balbi
Date: Thu May 26 2016 - 02:25:20 EST



Hi,

Baolin Wang <baolin.wang@xxxxxxxxxx> writes:
> When handling the endpoint interrupt handler, it maybe disable the endpoint
> from another core user to set the USB endpoint descriptor pointor to be NULL
> while issuing usb_gadget_giveback_request() function to release lock. So it
> will be one bug to check the endpoint type by usb_endpoint_xfer_xxx() APIs with
> one NULL USB endpoint descriptor.

too complex, Baolin :-) Can you see if this helps:

https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git/commit/?id=88bf752cfb55e57a78e27c931c9fef63240c739a

The only situation when that can happen is while we drop our lock on
dwc3_gadget_giveback().

--
balbi

Attachment: signature.asc
Description: PGP signature