linux-stable/drivers/usb/gadget/udc/bdc
Alexey Khoroshilov cff5638ef7 usb: gadget: bdc_udc: fix race condition in bdc_udc_exit()
bdc_ep_disable() expects to be called with bdc->lock held.
The assumption is met in all the cases except for call from bdc_udc_exit(),
that is called from bdc_remove(). As a result a race can happen or unheld
bdc->lock can be unlocked in bdc_req_complete().

The patch proposes to acquire-release bdc->lock around bdc_ep_disable()
in bdc_udc_exit().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2016-03-04 15:14:47 +02:00
..
bdc.h treewide: fix typos in comment blocks 2015-08-07 14:46:24 +02:00
bdc_cmd.c
bdc_cmd.h
bdc_core.c usb: gadget: drop null test before destroy functions 2015-09-21 14:42:36 -05:00
bdc_dbg.c
bdc_dbg.h
bdc_ep.c usb: gadget: bdc: fix memory leak 2015-09-30 11:20:21 -05:00
bdc_ep.h
bdc_pci.c
bdc_udc.c usb: gadget: bdc_udc: fix race condition in bdc_udc_exit() 2016-03-04 15:14:47 +02:00
Kconfig
Makefile