]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: gadget: fix race when disabling ep with cancelled xfers
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 31 Oct 2019 09:07:13 +0000 (11:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Oct 2019 17:57:54 +0000 (18:57 +0100)
commitc8a5bfdc683227b7154b80e00e5ec8a01d1541f6
tree8758ed40cb287c190ae0190cc3790164bd371aa2
parent33ee687a76f556bd3c5811b8b4cdef064cab3f06
usb: dwc3: gadget: fix race when disabling ep with cancelled xfers

When disabling an endpoint which has cancelled requests, we should
make sure to giveback requests that are currently pending in the
cancelled list, otherwise we may fall into a situation where command
completion interrupt fires after endpoint has been disabled, therefore
causing a splat.

Fixes: cf160a5a1490 "usb: dwc3: gadget: remove wait_end_transfer"
Reported-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Link: https://lore.kernel.org/r/20191031090713.1452818-1-felipe.balbi@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c