android_kernel_motorola_sm6375/drivers/usb
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Chunfeng Yun 26ca30516b usb: mtu3: fix kernel panic at qmu transfer done irq handler
[ Upstream commit d28f4091ea7ec3510fd6a3c6d433234e7a2bef14 ]

When handle qmu transfer irq, it will unlock @mtu->lock before give back
request, if another thread handle disconnect event at the same time, and
try to disable ep, it may lock @mtu->lock and free qmu ring, then qmu
irq hanlder may get a NULL gpd, avoid the KE by checking gpd's value before
handling it.

e.g.
qmu done irq on cpu0                 thread running on cpu1

qmu_done_tx()
  handle gpd [0]
    mtu3_requ_complete()        mtu3_gadget_ep_disable()
      unlock @mtu->lock
        give back request         lock @mtu->lock
                                    mtu3_ep_disable()
                                      mtu3_gpd_ring_free()
                                   unlock @mtu->lock
      lock @mtu->lock
    get next gpd [1]

[1]: goto [0] to handle next gpd, and next gpd may be NULL.

Fixes: 48e0d3735a ("usb: mtu3: supports new QMU format")
Signed-off-by: Chunfeng Yun <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2023-05-17 11:35:49 +02:00
..
atm
c67x00
cdns3 usb: cdns3: Fix issue with using incorrect PCI device function 2023-04-05 11:16:40 +02:00
chipidea usb: chipidea: fix missing goto in ci_hdrc_probe 2023-05-17 11:35:49 +02:00
class USB: cdc-acm: Add Icom PMR F3400 support (0c26:0020) 2022-09-15 12:04:52 +02:00
common Revert "usb: ulpi: defer ulpi_register on ulpi_read_id timeout" 2023-01-18 11:42:06 +01:00
core USB: core: Don't hold device lock while reading the "descriptors" sysfs file 2023-03-03 11:41:49 +01:00
dwc2 usb: dwc2: fix wrong order of phy_power_on and phy_init 2022-09-15 12:04:52 +02:00
dwc3 USB: dwc3: fix runtime pm imbalance on unbind 2023-05-17 11:35:32 +02:00
early
gadget usb: gadget: udc: renesas_usb3: Fix use after free bug in renesas_usb3_remove due to race condition 2023-05-17 11:35:46 +02:00
host usb: host: xhci-rcar: remove leftover quirk handling 2023-05-17 11:35:45 +02:00
image
isp1760
misc USB: misc: iowarrior: fix up header size for USB_DEVICE_ID_CODEMERCS_IOW100 2023-01-24 07:18:00 +01:00
mon usb: mon: make mmapped memory read only 2022-10-15 07:54:38 +02:00
mtu3 usb: mtu3: fix kernel panic at qmu transfer done irq handler 2023-05-17 11:35:49 +02:00
musb usb: musb: remove extra check in musb_gadget_vbus_draw 2023-01-18 11:40:49 +01:00
phy
renesas_usbhs usb: renesas: Fix refcount leak bug 2022-08-25 11:18:33 +02:00
roles usb: roles: fix of node refcount leak in usb_role_switch_is_parent() 2023-01-18 11:41:24 +01:00
serial USB: serial: option: add UNISOC vendor and TOZED LT70C product 2023-05-17 11:35:31 +02:00
storage uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS583Gen 2 2023-04-05 11:16:39 +02:00
typec usb: typec: altmodes/displayport: Fix configure initial pin assignment 2023-04-20 12:07:33 +02:00
usbip usb: usbip: add missing device lock on tweak configuration cmd 2022-06-14 18:11:51 +02:00
Kconfig
Makefile
usb-skeleton.c