linux-stable/drivers/usb/chipidea
Li Jun e5d6a7c6cf
usb: chipidea: host: fix port index underflow and UBSAN complains
If wIndex is 0 (and it often is), these calculations underflow and
UBSAN complains, here resolve this by not decrementing the index when
it is equal to 0, this copies the solution from commit 85e3990bea
("USB: EHCI: avoid undefined pointer arithmetic and placate UBSAN")

Reported-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Link: https://lore.kernel.org/r/1624004938-2399-1-git-send-email-jun.li@nxp.com
Signed-off-by: Peter Chen <peter.chen@kernel.org>
2021-08-21 13:15:25 +08:00
..
bits.h
ci.h USB: chipidea: remove dentry storage for debugfs file 2021-05-27 09:34:34 +02:00
ci_hdrc_imx.c usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data() 2020-12-28 15:45:53 +01:00
ci_hdrc_imx.h usb: chipidea: imx: add two samsung picophy parameters tuning implementation 2020-08-23 11:40:08 +08:00
ci_hdrc_msm.c
ci_hdrc_pci.c
ci_hdrc_tegra.c usb: chipidea: tegra: Silence deferred probe error 2021-03-23 12:50:32 +01:00
ci_hdrc_usb2.c
core.c usb: chipidea: core: Fix incorrectly documented function 'ci_usb_phy_exit()' 2021-05-27 09:43:44 +02:00
debug.c USB: chipidea: remove dentry storage for debugfs file 2021-05-27 09:34:34 +02:00
host.c usb: chipidea: host: fix port index underflow and UBSAN complains 2021-08-21 13:15:25 +08:00
host.h
Kconfig usb: chipidea: tegra: Support host mode 2021-01-13 11:26:34 +01:00
Makefile usb: chipidea: add tracepoint support for udc 2020-12-10 08:45:26 +08:00
otg.c usb: chipidea: otg: Fix formatting and missing documentation issues 2021-05-27 09:43:44 +02:00
otg.h
otg_fsm.c
otg_fsm.h
trace.c usb: chipidea: add tracepoint support for udc 2020-12-10 08:45:26 +08:00
trace.h usb: chipidea: trace: fix the endian issue 2020-12-10 08:45:26 +08:00
udc.c Merge 5.13-rc4 into usb-next 2021-05-31 09:50:26 +02:00
udc.h
ulpi.c
usbmisc_imx.c usb: chipidea: imx: Fix Battery Charger 1.2 CDP detection 2021-06-16 09:04:22 +08:00