linux-stable/drivers/usb
Wesley Cheng c7bb96a37d usb: dwc3: gadget: Prevent EP queuing while stopping transfers
commit f09ddcfcb8 upstream.

In the situations where the DWC3 gadget stops active transfers, once
calling the dwc3_gadget_giveback(), there is a chance where a function
driver can queue a new USB request in between the time where the dwc3
lock has been released and re-aquired.  This occurs after we've already
issued an ENDXFER command.  When the stop active transfers continues
to remove USB requests from all dep lists, the newly added request will
also be removed, while controller still has an active TRB for it.
This can lead to the controller accessing an unmapped memory address.

Fix this by ensuring parameters to prevent EP queuing are set before
calling the stop active transfers API.

Fixes: ae7e86108b ("usb: dwc3: Stop active transfers before halting the controller")
Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
Link: https://lore.kernel.org/r/1615507142-23097-1-git-send-email-wcheng@codeaurora.org
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-25 09:04:15 +01:00
..
atm usb: atm: don't use snprintf() for sysfs attrs 2020-08-25 19:11:18 +02:00
c67x00 Linux 5.9-rc3 2020-08-31 07:11:45 +02:00
cdns3 usb: cdns3: fix NULL pointer dereference on no platform data 2021-03-11 14:17:26 +01:00
chipidea usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data() 2021-01-12 20:18:19 +01:00
class USB: usblp: fix a hang in poll() if disconnected 2021-03-17 17:06:29 +01:00
common usb: common: usb-conn-gpio: Print error on failure to get VBUS 2020-08-18 12:13:44 +02:00
core drm: Use USB controller's DMA mask when importing dmabufs 2021-03-17 17:06:19 +01:00
dwc2 usb: dwc2: Make "trimming xfer length" a debug message 2021-03-04 11:37:26 +01:00
dwc3 usb: dwc3: gadget: Prevent EP queuing while stopping transfers 2021-03-25 09:04:15 +01:00
early usb: early: ehci-dbgp: convert to readl_poll_timeout_atomic() 2020-09-25 16:29:09 +02:00
gadget usb: gadget: configfs: Fix KASAN use-after-free 2021-03-25 09:04:14 +01:00
host xhci: Fix repeated xhci wake after suspend due to uncleared internal wake state 2021-03-17 17:06:30 +01:00
image USB: microtek: use set_host_byte() 2020-09-16 12:42:10 +02:00
isp1760 usb: isp1760-hcd: convert to readl_poll_timeout_atomic() 2020-09-25 16:30:05 +02:00
misc USB: yurex: fix control-URB timeout handling 2021-01-12 20:18:20 +01:00
mon
mtu3 usb: mtu3: fix memory corruption in mtu3_debugfs_regset() 2020-12-26 16:02:38 +01:00
musb usb: musb: Fix runtime PM race in musb_queue_resume_work 2021-03-04 11:38:24 +01:00
phy usb: phy: phy-ab8500-usb: fix spello of "function" 2020-10-02 09:57:41 +03:00
renesas_usbhs usb: renesas_usbhs: Clear PIPECFG for re-enabling pipe with other EPNUM 2021-03-17 17:06:29 +01:00
roles device connection: Remove struct device_connection 2020-09-07 11:14:09 +02:00
serial USB: serial: cp210x: add some more GE USB IDs 2021-03-17 17:06:30 +01:00
storage usb-storage: Add quirk to defeat Kindle's automatic unload 2021-03-25 09:04:14 +01:00
typec usb: typec: tcpm: Invoke power_supply_changed for tcpm-source-psy- 2021-03-25 09:04:14 +01:00
usbip usbip: Fix incorrect double assignment to udc->ud.tcp_rx 2021-03-25 09:04:14 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
usb-skeleton.c