Files
linux/include/linux
Alan Stern 1015c27a5e USB: core: Limit the length of unkillable synchronous timeouts
The usb_control_msg(), usb_bulk_msg(), and usb_interrupt_msg() APIs in
usbcore allow unlimited timeout durations.  And since they use
uninterruptible waits, this leaves open the possibility of hanging a
task for an indefinitely long time, with no way to kill it short of
unplugging the target device.

To prevent this sort of problem, enforce a maximum limit on the length
of these unkillable timeouts.  The limit chosen here, somewhat
arbitrarily, is 60 seconds.  On many systems (although not all) this
is short enough to avoid triggering the kernel's hung-task detector.

In addition, clear up the ambiguity of negative timeout values by
treating them the same as 0, i.e., using the maximum allowed timeout.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
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/15fc9773-a007-47b0-a703-df89a8cf83dd@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-03-11 16:16:56 +01:00
..
2026-02-11 13:44:47 +01:00
2026-01-29 20:21:41 +01:00
2025-12-15 14:33:38 +01:00
2026-01-20 19:44:19 -08:00
2026-02-12 04:23:53 -07:00
2025-11-21 11:21:31 +01:00
2025-12-16 14:40:51 +01:00
2025-12-13 20:04:32 +12:00
2025-12-23 11:23:10 -08:00
2026-01-12 16:52:09 +01:00
2026-02-06 07:29:14 -07:00
2026-01-05 16:43:31 +01:00
2026-01-11 06:09:11 -10:00
2026-01-20 19:24:50 -08:00
2026-01-26 19:03:47 -08:00
2025-11-23 12:30:40 +01:00
2025-12-29 11:53:38 +01:00
2026-01-26 20:02:27 -08:00
2026-02-20 17:31:55 -05:00
2026-01-30 11:34:34 +00:00
2026-02-10 11:39:31 +01:00
2026-02-10 11:39:30 +01:00
2026-01-11 06:09:11 -10:00
2025-11-27 14:24:30 -08:00
2026-01-11 06:09:11 -10:00
2025-11-28 09:21:18 -07:00
2026-01-05 16:43:30 +01:00
2026-01-31 14:22:57 -08:00
2026-01-14 12:04:34 +01:00
2026-02-04 13:22:39 -08:00
2026-01-06 17:06:03 -08:00
2026-01-11 06:09:11 -10:00
2026-01-20 19:24:47 -08:00
2026-01-30 18:26:59 -08:00