linux/drivers/usb/core
Alan Stern 416909962e USB: usbcore: Introduce usb_bulk_msg_killable()
The synchronous message API in usbcore (usb_control_msg(),
usb_bulk_msg(), and so on) uses uninterruptible waits.  However,
drivers may call these routines in the context of a user thread, which
means it ought to be possible to at least kill them.

For this reason, introduce a new usb_bulk_msg_killable() function
which behaves the same as usb_bulk_msg() except for using
wait_for_completion_killable_timeout() instead of
wait_for_completion_timeout().  The same can be done later for
usb_control_msg() later on, if it turns out to be needed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Suggested-by: Oliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/linux-usb/3acfe838-6334-4f6d-be7c-4bb01704b33d@rowland.harvard.edu/
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
CC: stable@vger.kernel.org
Link: https://patch.msgid.link/248628b4-cc83-4e81-a620-3ce4e0376d41@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-03-11 16:16:56 +01:00
..
buffer.c
config.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
devices.c USB: Remove remnants of Wireless USB and UWB 2023-08-09 14:17:06 +02:00
devio.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
driver.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
endpoint.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
file.c USB: make usb class a const structure 2023-07-25 17:49:30 +02:00
generic.c USB: lower "Device is not authorized for usage" message to info 2025-08-13 16:55:27 +02:00
hcd-pci.c usb: core: modify comments xhci_hc_driver has HCD_MEMORY just like ehci ohci 2025-06-19 12:31:16 +02:00
hcd.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
hub.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hub.h usb: hub: Fix flushing of delayed work used for post resume purposes 2025-06-30 15:36:00 +02:00
Kconfig usb: core: Kconfig: Improve USB authorization mode help 2024-02-17 16:38:35 +01:00
ledtrig-usbport.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Makefile usb: core: Add tracepoints for device allocation and state changes 2025-10-22 10:58:30 +02:00
message.c USB: usbcore: Introduce usb_bulk_msg_killable() 2026-03-11 16:16:56 +01:00
notify.c
of.c usb: core: add missing of_node_put() in usb_of_has_devices_or_graph 2024-07-03 16:04:10 +02:00
offload.c usb: offload: add apis for offload usage tracking 2025-09-12 14:08:02 +02:00
otg_productlist.h
phy.c usb: core: don't power off roothub PHYs if phy_set_mode() fails 2026-03-11 16:16:41 +01:00
phy.h usb: core: add phy notify connect and disconnect 2024-01-27 17:36:14 -08:00
port.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
quirks.c USB: add QUIRK_NO_BOS for video capture several devices 2026-02-23 20:08:06 +01:00
sysfs.c sysfs: treewide: switch back to attribute_group::bin_attrs 2025-06-17 10:44:15 +02:00
trace.c usb: core: Add tracepoints for device allocation and state changes 2025-10-22 10:58:30 +02:00
trace.h usb: core: Add tracepoints for device allocation and state changes 2025-10-22 10:58:30 +02:00
urb.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
usb-acpi.c usb: acpi: fix device link removal 2025-06-19 12:36:19 +02:00
usb.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
usb.h USB: make to_usb_device_driver() use container_of_const() 2024-11-14 17:57:33 +01:00