android_kernel_motorola_sm6375/drivers/usb
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Marek Szyprowski d232ca0bbc usb: dwc2: gadget: don't reset gadget's driver->bus
[ Upstream commit 3120aac6d0ecd9accf56894aeac0e265f74d3d5a ]

UDC driver should not touch gadget's driver internals, especially it
should not reset driver->bus. This wasn't harmful so far, but since
commit fc274c1e9973 ("USB: gadget: Add a new bus for gadgets") gadget
subsystem got it's own bus and messing with ->bus triggers the
following NULL pointer dereference:

dwc2 12480000.hsotg: bound driver g_ether
8<--- cut here ---
Unable to handle kernel NULL pointer dereference at virtual address 00000000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in: ...
CPU: 0 PID: 620 Comm: modprobe Not tainted 5.18.0-rc5-next-20220504 #11862
Hardware name: Samsung Exynos (Flattened Device Tree)
PC is at module_add_driver+0x44/0xe8
LR is at sysfs_do_create_link_sd+0x84/0xe0
...
Process modprobe (pid: 620, stack limit = 0x(ptrval))
...
 module_add_driver from bus_add_driver+0xf4/0x1e4
 bus_add_driver from driver_register+0x78/0x10c
 driver_register from usb_gadget_register_driver_owner+0x40/0xb4
 usb_gadget_register_driver_owner from do_one_initcall+0x44/0x1e0
 do_one_initcall from do_init_module+0x44/0x1c8
 do_init_module from load_module+0x19b8/0x1b9c
 load_module from sys_finit_module+0xdc/0xfc
 sys_finit_module from ret_fast_syscall+0x0/0x54
Exception stack(0xf1771fa8 to 0xf1771ff0)
...
dwc2 12480000.hsotg: new device is high-speed
---[ end trace 0000000000000000 ]---

Fix this by removing driver->bus entry reset.

Signed-off-by: Marek Szyprowski <[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]>
2022-06-14 18:12:00 +02:00
..
atm
c67x00
cdns3 usb: cdns3: fix race condition before setting doorbell 2021-10-06 15:42:30 +02:00
chipidea USB: chipidea: fix interrupt deadlock 2021-11-17 09:48:27 +01:00
class usb: cdc-wdm: fix reading stuck on device close 2022-05-18 09:47:26 +02:00
common usb: ulpi: Call of_node_put correctly 2022-02-16 12:52:52 +01:00
core USB: hcd-pci: Fully suspend across freeze/thaw cycle 2022-06-14 18:11:59 +02:00
dwc2 usb: dwc2: gadget: don't reset gadget's driver->bus 2022-06-14 18:12:00 +02:00
dwc3 usb: dwc3: pci: Fix pm_runtime_get_sync() error checking 2022-06-14 18:11:52 +02:00
early
gadget usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind() 2022-05-09 09:03:22 +02:00
host drivers: usb: host: Fix deadlock in oxu_bus_suspend() 2022-06-14 18:11:59 +02:00
image
isp1760
misc usb: misc: fix improper handling of refcount in uss720_probe() 2022-05-09 09:03:21 +02:00
mon
mtu3 usb: mtu3: fix USB 3.0 dual-role-switch from device to host 2022-05-09 09:03:20 +02:00
musb usb: musb: Fix missing of_node_put() in omap2430_probe 2022-06-14 18:11:51 +02:00
phy usb: phy: tahvo: add IRQ check 2021-09-15 09:47:35 +02:00
renesas_usbhs
roles
serial USB: serial: option: add Quectel BG95 modem 2022-06-14 18:11:23 +02:00
storage USB: storage: karma: fix rio_karma_init return 2022-06-14 18:11:51 +02:00
typec usb: typec: tcpci: Don't skip cleanup in .remove() on error 2022-05-18 09:47:27 +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