linux/drivers/usb/core
Tasos Sahanidis 6bf55f6b0e usb: core: Don't hold the device lock while sleeping in do_proc_control()
commit 0543e4e885 upstream.

Since commit ae8709b296 ("USB: core: Make do_proc_control() and
do_proc_bulk() killable") if a device has the USB_QUIRK_DELAY_CTRL_MSG
quirk set, it will temporarily block all other URBs (e.g. interrupts)
while sleeping due to a control.

This results in noticeable delays when, for example, a userspace usbfs
application is sending URB interrupts at a high rate to a keyboard and
simultaneously updates the lock indicators using controls. Interrupts
with direction set to IN are also affected by this, meaning that
delivery of HID reports (containing scancodes) to the usbfs application
is delayed as well.

This patch fixes the regression by calling msleep() while the device
mutex is unlocked, as was the case originally with usb_control_msg().

Fixes: ae8709b296 ("USB: core: Make do_proc_control() and do_proc_bulk() killable")
Cc: stable <stable@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
Link: https://lore.kernel.org/r/3e299e2a-13b9-ddff-7fee-6845e868bc06@tasossah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-09 09:14:28 +02:00
..
buffer.c
config.c usb: core: config: using bit mask instead of individual bits 2021-12-14 10:57:20 +01:00
devices.c
devio.c usb: core: Don't hold the device lock while sleeping in do_proc_control() 2022-05-09 09:14:28 +02:00
driver.c
endpoint.c
file.c
generic.c
hcd-pci.c
hcd.c USB: core: Fix hang in usb_kill_urb by adding memory barriers 2022-02-01 17:27:04 +01:00
hub.c usb: hub: Add delay for SuperSpeed hub resume to let links transit to U0 2022-01-27 11:04:44 +01:00
hub.h
Kconfig
ledtrig-usbport.c
Makefile
message.c USB: core: Avoid WARNings for 0-length descriptor requests 2021-06-09 11:11:39 +02:00
notify.c
of.c
otg_productlist.h
phy.c
phy.h
port.c
quirks.c USB: quirks: add STRING quirk for VCOM device 2022-05-09 09:14:27 +02:00
sysfs.c driver core: Move the "removable" attribute from USB to core 2021-05-27 09:36:31 +02:00
urb.c USB: core: Fix hang in usb_kill_urb by adding memory barriers 2022-02-01 17:27:04 +01:00
usb-acpi.c
usb.c
usb.h