TencentOS-kernel/drivers/usb
Shuah Khan 89f91d7a35 usbip: synchronize event handler with sysfs code paths
commit 363eaa3a450abb4e63bd6e3ad79d1f7a0f717814 upstream.

Fuzzing uncovered race condition between sysfs code paths in usbip
drivers. Device connect/disconnect code paths initiated through
sysfs interface are prone to races if disconnect happens during
connect and vice versa.

Use sysfs_lock to synchronize event handler with sysfs paths
in usbip drivers.

Cc: stable@vger.kernel.org
Reported-and-tested-by: syzbot+a93fba6d384346a761e3@syzkaller.appspotmail.com
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/c5c8723d3f29dfe3d759cfaafa7dd16b0dfe2918.1616807117.git.skhan@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-20 16:06:58 +08:00
..
atm Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
c67x00 USB: c67x00: fix use after free in c67x00_giveback_urb 2021-03-16 16:32:07 +08:00
cdns3 usb: cdns3: gadget: suspicious implicit sign extension 2021-03-16 16:40:27 +08:00
chipidea usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data() 2021-04-12 12:51:11 +08:00
class USB: cdc-acm: fix use-after-free after probe failure 2021-05-20 16:06:51 +08:00
common Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
core USB: quirks: ignore remote wake-up on Fibocom L850-GL LTE modem 2021-05-20 16:06:50 +08:00
dwc2 usb: dwc2: Prevent core suspend when port connection flag is 0 2021-05-20 16:06:51 +08:00
dwc3 usb: dwc3: qcom: Honor wakeup enabled/disabled state 2021-04-12 12:53:06 +08:00
early USB: early: Handle AMD's spec-compliant identifiers, too 2021-03-16 16:26:55 +08:00
gadget usb: gadget: udc: amd5536udc_pci fix null-ptr-dereference 2021-05-20 16:06:51 +08:00
host usb: xhci-mtk: fix broken streams issue on 0.96 xHCI 2021-05-20 16:06:51 +08:00
image Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
isp1760 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
misc USB: yurex: fix control-URB timeout handling 2021-04-12 12:51:12 +08:00
mon Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mtu3 usb: mtu3: fix memory corruption in mtu3_debugfs_regset() 2021-03-16 16:42:31 +08:00
musb usb: musb: Fix suspend with devices connected for a64 2021-05-20 16:06:51 +08:00
phy usb: phy: twl6030-usb: Fix a resource leak in an error handling path in 'twl6030_usb_probe()' 2021-03-16 16:28:29 +08:00
renesas_usbhs usb: renesas_usbhs: Clear PIPECFG for re-enabling pipe with other EPNUM 2021-04-12 12:53:07 +08:00
roles Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
serial USB: serial: cp210x: add some more GE USB IDs 2021-04-12 12:53:07 +08:00
storage usb-storage: Add quirk to defeat Kindle's automatic unload 2021-04-12 12:53:18 +08:00
typec usb: typec: tcpm: Invoke power_supply_changed for tcpm-source-psy- 2021-04-12 12:53:19 +08:00
usbip usbip: synchronize event handler with sysfs code paths 2021-05-20 16:06:58 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
usb-skeleton.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00