linux/drivers/usb
Jerome Brunet 068fdad204 usb: gadget: u_audio: fix race condition on endpoint stop
If the endpoint completion callback is call right after the ep_enabled flag
is cleared and before usb_ep_dequeue() is call, we could do a double free
on the request and the associated buffer.

Fix this by clearing ep_enabled after all the endpoint requests have been
dequeued.

Fixes: 7de8681be2 ("usb: gadget: u_audio: Free requests only after callback")
Cc: stable <stable@vger.kernel.org>
Reported-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20210827092927.366482-1-jbrunet@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-27 16:07:23 +02:00
..
atm usb: atm: cxacru: Fix typo in comment 2021-05-21 20:05:40 +02:00
c67x00
cdns3 usb: cdnsp: Fix the IMAN_IE_SET and IMAN_IE_CLEAR macro 2021-07-29 14:28:15 +08:00
chipidea Linux 5.13-rc7 2021-06-21 10:56:05 +02:00
class USB: usbtmc: Fix RCU stall warning 2021-07-27 15:52:37 +02:00
common usb: otg-fsm: Fix hrtimer list corruption 2021-07-27 16:31:31 +02:00
core Revert "USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem" 2021-07-21 11:36:34 +02:00
dwc2 usb: dwc2: gadget: Fix sending zero length packet in DDMA mode. 2021-07-21 09:50:55 +02:00
dwc3 usb: dwc3: gadget: Stop EP0 transfers during pullup disable 2021-08-26 13:48:58 +02:00
early
gadget usb: gadget: u_audio: fix race condition on endpoint stop 2021-08-27 16:07:23 +02:00
host usb: renesas-xhci: Prefer firmware loading on unknown ROM state 2021-08-26 14:56:59 +02:00
image
isp1760 usb: isp1760: Fix meaningless check in isp1763_run() 2021-06-15 15:40:58 +02:00
misc usb: ftdi-elan: remove redundant continue statement in a while-loop 2021-06-24 14:12:09 +02:00
mon
mtu3 usb: mtu3: use clock bulk to get clocks 2021-06-15 15:46:45 +02:00
musb usb: musb: Fix suspend and resume issues for PHYs on I2C and SPI 2021-07-27 16:31:02 +02:00
phy usb: phy: Fix page fault from usb_phy_uevent 2021-07-21 09:48:36 +02:00
renesas_usbhs usb: renesas_usbhs: Fix superfluous irqs happen after usb_pkt_pop() 2021-07-21 09:50:00 +02:00
roles usb: roles: add helper usb_role_string() 2021-05-27 09:17:18 +02:00
serial Revert "USB: serial: ch341: fix character loss at high transfer rates" 2021-08-25 09:13:33 +02:00
storage USB: usb-storage: Add LaCie Rugged USB3-FW to IGNORE_UAS 2021-07-21 09:15:45 +02:00
typec usb: typec: tcpm: Raise vdm_sm_running flag only when VDM SM is running 2021-08-26 14:59:04 +02:00
usbip Scheduler updates for this cycle are: 2021-04-28 13:33:57 -07:00
Kconfig
Makefile
usb-skeleton.c