linux_dsm_epyc7002/drivers/usb/gadget/udc
Gustavo A. R. Silva b987b66ac3 usb: udc: lpc32xx: fix bad bit shift operation
It seems that the right variable to use in this case is *i*, instead of
*n*, otherwise there is an undefined behavior when right shifiting by more
than 31 bits when multiplying n by 8; notice that *n* can take values
equal or greater than 4 (4, 8, 16, ...).

Also, notice that under the current conditions (bl = 3), we are skiping
the handling of bytes 3, 7, 31... So, fix this by updating this logic
and limit *bl* up to 4 instead of up to 3.

This fix is based on function udc_stuff_fifo().

Addresses-Coverity-ID: 1454834 ("Bad bit shift operation")
Fixes: 24a28e4283 ("USB: gadget driver for LPC32xx")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Link: https://lore.kernel.org/r/20191014191830.GA10721@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-15 20:07:44 +02:00
..
aspeed-vhub USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
bdc usb: Remove dev_err() usage after platform_get_irq() 2019-07-30 20:29:18 +02:00
amd5536udc_pci.c
amd5536udc.h
at91_udc.c usb: gadget: at91_udc: Remove unneeded variable 2019-06-18 11:58:29 +03:00
at91_udc.h
atmel_usba_udc.c usb: gadget: atmel_usba_udc: Mark expected switch fall-through 2019-08-09 07:55:44 +02:00
atmel_usba_udc.h usb: gadget: atmel: support USB suspend 2019-05-03 09:13:49 +03:00
bcm63xx_udc.c usb: Remove dev_err() usage after platform_get_irq() 2019-07-30 20:29:18 +02:00
core.c usb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails 2019-08-28 13:04:59 +03:00
dummy_hcd.c USB: dummy-hcd: fix power budget for SuperSpeed mode 2019-10-04 11:02:59 +02:00
fotg210-udc.c fotg210-udc: Remove unneeded variable 2019-06-18 11:58:29 +03:00
fotg210.h
fsl_mxc_udc.c
fsl_qe_udc.c
fsl_qe_udc.h
fsl_udc_core.c usb: gadget: fsl_udc_core: fixup struct_udc_setup documentation 2018-10-02 10:43:12 +03:00
fsl_usb2_udc.h
fusb300_udc.c usb: gadget: fusb300_udc: Fix memory leak of fusb300->ep[i] 2019-06-06 13:51:57 +03:00
fusb300_udc.h
goku_udc.c
goku_udc.h
gr_udc.c usb: Remove dev_err() usage after platform_get_irq() 2019-07-30 20:29:18 +02:00
gr_udc.h
Kconfig udc: lpc32xx: fix 64-bit compiler warning 2019-10-04 14:35:19 +02:00
lpc32xx_udc.c usb: udc: lpc32xx: fix bad bit shift operation 2019-10-15 20:07:44 +02:00
m66592-udc.c
m66592-udc.h
Makefile
mv_u3d_core.c
mv_u3d.h
mv_udc_core.c usb: gadget: udc: Remove unnecessary parentheses 2018-10-02 10:30:07 +03:00
mv_udc.h
net2272.c usb: gadget: net2272: remove redundant assignments to pointer 's' 2019-06-18 11:58:29 +03:00
net2272.h
net2280.c usb: gadget: net2280: Add workaround for AB chip Errata 11 2019-08-30 09:27:33 +03:00
net2280.h usb: gadget: net2280: Move all "ll" registers in one structure 2019-08-30 09:14:38 +03:00
omap_udc.c USB: omap_udc: Remove unneeded variable 2019-06-18 11:58:29 +03:00
omap_udc.h
pch_udc.c usb: gadget: pch_udc: Use dev_get_drvdata 2019-08-09 08:28:29 +03:00
pxa25x_udc.c
pxa25x_udc.h
pxa27x_udc.c
pxa27x_udc.h
r8a66597-udc.c
r8a66597-udc.h
renesas_usb3.c Merge 5.3-rc5 into usb-next 2019-08-19 07:15:42 +02:00
s3c2410_udc.c USB: gadget: udc: s3c2410_udc: Mark expected switch fall-throughs 2019-08-09 07:55:44 +02:00
s3c2410_udc.h
s3c-hsudc.c usb: Remove dev_err() usage after platform_get_irq() 2019-07-30 20:29:18 +02:00
snps_udc_core.c usb: gadget: udc: reduce indentation 2019-01-28 12:51:30 +02:00
snps_udc_plat.c
trace.c
trace.h
udc-xilinx.c usb: Remove dev_err() usage after platform_get_irq() 2019-07-30 20:29:18 +02:00