linux/drivers/usb
Khalid Masum d27c66adb4 usb: ehci: Use endpoint in URB to get maxpacket
usb_maxpacket() looks up the endpoint number in the pipe which can fail
if the interface or configuration changes before the routine is called.
This is unexpected and may even cause a modulo by zero afterwards.

So use usb_endpoint_maxp() routine which uses the endpoint stored in URB
to get the maxpacket.

Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>
Addresses-Coverity: 744857 ("Division or modulo by zero")
Addresses-Coverity: 1487371 ("Division or modulo by zero")
Link: https://lore.kernel.org/r/20220824193813.13129-1-khalid.masum.92@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-31 09:07:53 +02:00
..
atm usb: move from strlcpy with unused retval to strscpy 2022-08-19 11:08:54 +02:00
c67x00 USB: c67x00: remove unnecessary check of res 2022-05-12 11:36:46 +02:00
cdns3 usb: cdns3: Don't use priv_dev uninitialized in cdns3_gadget_ep_enable() 2022-08-04 11:53:48 -07:00
chipidea usb: chipidea: Add support for VBUS control with PHY 2022-08-31 09:07:52 +02:00
class USB: cdc-acm: use CDC serial-state defines 2022-07-25 10:57:41 +02:00
common usb: common: debug: Check non-standard control requests 2022-08-19 11:04:25 +02:00
core usb/hcd: Fix dma_map_sg error check 2022-08-19 11:10:23 +02:00
dwc2 usb: dwc2: drop unexpected word "the" in the comments 2022-06-24 13:37:34 +02:00
dwc3 usb: dwc3: qcom: clean up icc init 2022-08-19 11:04:58 +02:00
early usb: early: xhci-dbc: Fix xdbc number parsing 2022-03-15 18:20:34 +01:00
gadget usb: gadget: function: rndis: limit # of RNDIS instances to 1000 2022-08-31 09:07:52 +02:00
host usb: ehci: Use endpoint in URB to get maxpacket 2022-08-31 09:07:53 +02:00
image usb/image: fix repeated words in comments 2022-07-27 14:33:53 +02:00
isp1760 usb: isp1760: Fix out-of-bounds array access 2022-05-19 18:10:59 +02:00
misc usb: move from strlcpy with unused retval to strscpy 2022-08-19 11:08:54 +02:00
mon
mtu3 Tracing updates for 5.20 / 6.0 2022-08-05 09:41:12 -07:00
musb Tracing updates for 5.20 / 6.0 2022-08-05 09:41:12 -07:00
phy usb: phy: remove redundant store to variable var after & operation 2022-07-27 14:24:50 +02:00
renesas_usbhs usb: renesas: Fix refcount leak bug 2022-06-21 16:39:03 +02:00
roles
serial USB-serial updates for 5.20-rc1 2022-07-25 11:28:52 +02:00
storage usb: move from strlcpy with unused retval to strscpy 2022-08-19 11:08:54 +02:00
typec usb: move from strlcpy with unused retval to strscpy 2022-08-19 11:08:54 +02:00
usbip usb: move from strlcpy with unused retval to strscpy 2022-08-19 11:08:54 +02:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c usb: usb-skeleton: Update min() to min_t() 2021-10-05 12:56:48 +02:00