android_kernel_sony_sdm845/drivers/usb/core
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alan Stern 3cbc8867d7 USB: Skip endpoints with 0 maxpacket length
[ Upstream commit d482c7bb0541d19dea8bff437a9f3c5563b5b2d2 ]

Endpoints with a maxpacket length of 0 are probably useless.  They
can't transfer any data, and it's not at all unlikely that an HCD will
crash or hang when trying to handle an URB for such an endpoint.

Currently the USB core does not check for endpoints having a maxpacket
value of 0.  This patch adds a check, printing a warning and skipping
over any endpoints it catches.

Now, the USB spec does not rule out endpoints having maxpacket = 0.
But since they wouldn't have any practical use, there doesn't seem to
be any good reason for us to accept them.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>

Link: https://lore.kernel.org/r/Pine.LNX.4.44L0.1910281050420.1485-100000@iolanthe.rowland.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-12 19:16:02 +01:00
..
buffer.c usb: core: buffer: avoid NULL pointer dereferrence 2016-04-28 12:35:36 -07:00
config.c USB: Skip endpoints with 0 maxpacket length 2019-11-12 19:16:02 +01:00
devices.c usb: core: rename mutex usb_bus_list_lock to usb_bus_idr_lock 2016-02-06 21:55:57 -08:00
devio.c usb: usbfs: fix double-free of usb memory upon submiturb error 2019-08-25 10:51:17 +02:00
driver.c USB: core: Fix bug caused by duplicate interface PM usage counter 2019-05-08 07:19:08 +02:00
endpoint.c
file.c USB: core: Fix races in character device registration and deregistraion 2019-08-25 10:51:48 +02:00
generic.c USB:fix USB3 devices behind USB3 hubs not resuming at hibernate thaw 2018-04-24 09:34:11 +02:00
hcd-pci.c usb: Don't die twice if PCI xhci host is not responding in resume 2018-09-26 08:36:35 +02:00
hcd.c usb: core: Add PM runtime calls to usb_hcd_platform_shutdown 2019-05-31 06:48:30 -07:00
hub.c usb: handle warm-reset port requests on hub resume 2019-11-06 12:18:03 +01:00
hub.h usb: Support USB 3.1 extended port status request 2016-01-24 20:16:52 -08:00
Kconfig usb: core: Introduce a USB port LED trigger 2016-09-27 12:20:17 +02:00
ledtrig-usbport.c usb: core: usbport: Use proper LED API to fix potential crash 2017-01-06 10:40:11 +01:00
Makefile usb: core: Introduce a USB port LED trigger 2016-09-27 12:20:17 +02:00
message.c USB: CDC: fix sanity checks in CDC union parser 2019-08-25 10:51:49 +02:00
notify.c
of.c usb: core: of.c: fix defined but not declare warning 2016-08-09 16:16:13 +02:00
otg_whitelist.h usb: core: use IS_ENABLED() instead of checking for built-in or module 2016-09-02 14:36:33 +02:00
port.c Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" 2016-05-02 08:44:31 -07:00
quirks.c USB: Fix chipmunk-like voice when using Logitech C270 for recording audio. 2019-06-22 08:17:20 +02:00
sysfs.c USB: Add new USB LPM helpers 2019-05-02 09:32:02 +02:00
urb.c USB: core: replace %p with %pK 2017-05-25 15:44:30 +02:00
usb-acpi.c usb: optimize acpi companion search for usb port devices 2017-08-24 17:12:21 -07:00
usb.c USB: check usb_get_extra_descriptor for proper size 2018-12-13 09:20:27 +01:00
usb.h USB: Add new USB LPM helpers 2019-05-02 09:32:02 +02:00