summaryrefslogtreecommitdiff
path: root/drivers/usb/misc/ldusb.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2019-10-28 10:52:35 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-28 17:46:22 +0100
commitd482c7bb0541d19dea8bff437a9f3c5563b5b2d2 (patch)
tree23b820c4d939478b8ca5dbff1300ed8bf8b91608 /drivers/usb/misc/ldusb.c
parent4ae8beac0abb9c3bbbb8340bab46eb287aea3001 (diff)
downloadlwn-d482c7bb0541d19dea8bff437a9f3c5563b5b2d2.tar.gz
lwn-d482c7bb0541d19dea8bff437a9f3c5563b5b2d2.zip
USB: Skip endpoints with 0 maxpacket length
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>
Diffstat (limited to 'drivers/usb/misc/ldusb.c')
0 files changed, 0 insertions, 0 deletions