linux-stable/drivers/usb/musb
Viraj Shah 21b5fcdccb usb: musb: Balance list entry in musb_gadget_queue
musb_gadget_queue() adds the passed request to musb_ep::req_list. If the
endpoint is idle and it is the first request then it invokes
musb_queue_resume_work(). If the function returns an error then the
error is passed to the caller without any clean-up and the request
remains enqueued on the list. If the caller enqueues the request again
then the list corrupts.

Remove the request from the list on error.

Fixes: ea2f35c01d ("usb: musb: Fix sleeping function called from invalid context for hdrc glue")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Viraj Shah <viraj.shah@linutronix.de>
Link: https://lore.kernel.org/r/20211021093644.4734-1-viraj.shah@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-22 11:12:45 +02:00
..
am35x.c
cppi_dma.c
cppi_dma.h
da8xx.c
davinci.c
davinci.h
jz4740.c
Kconfig usb: musb: select GENERIC_PHY instead of depending on it 2021-10-13 14:00:41 +02:00
Makefile
mediatek.c usb: musb: mediatek: Expose role-switch control to userspace 2021-09-14 11:55:22 +02:00
musb_core.c usb: musb: Implement tracing for state change events 2021-06-14 10:25:16 +02:00
musb_core.h
musb_cppi41.c
musb_debug.h
musb_debugfs.c
musb_dma.h
musb_dsps.c usb: musb: dsps: Fix the probe error path 2021-10-13 14:12:49 +02:00
musb_gadget.c usb: musb: Balance list entry in musb_gadget_queue 2021-10-22 11:12:45 +02:00
musb_gadget.h
musb_gadget_ep0.c
musb_host.c
musb_host.h
musb_io.h
musb_regs.h
musb_trace.c
musb_trace.h usb: musb: Implement tracing for state change events 2021-06-14 10:25:16 +02:00
musb_virthub.c
musbhsdma.c
omap2430.c usb: musb: Fix suspend and resume issues for PHYs on I2C and SPI 2021-07-27 16:31:02 +02:00
omap2430.h
sunxi.c usb: musb: sunxi: Don't print error on MUSB_ULPI_BUSCONTROL access 2021-10-22 11:12:14 +02:00
tusb6010.c Merge 5.15-rc3 into usb-next 2021-09-27 16:34:40 +02:00
tusb6010.h
tusb6010_omap.c
ux500.c
ux500_dma.c