linux/drivers/usb/gadget/udc
Evgeny Novikov 0d66e04875 usb: gadget: goku_udc: fix potential crashes in probe
goku_probe() goes to error label "err" and invokes goku_remove()
in case of failures of pci_enable_device(), pci_resource_start()
and ioremap(). goku_remove() gets a device from
pci_get_drvdata(pdev) and works with it without any checks, in
particular it dereferences a corresponding pointer. But
goku_probe() did not set this device yet. So, one can expect
various crashes. The patch moves setting the device just after
allocation of memory for it.

Found by Linux Driver Verification project (linuxtesting.org).

Reported-by: Pavel Andrianov <andrianov@ispras.ru>
Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2020-10-27 10:55:45 +02:00
..
aspeed-vhub usb: gadget: aspeed: fixup vhub port irq handling 2020-10-02 09:43:36 +03:00
bdc usb: bdc: remove duplicated error message 2020-10-02 09:57:46 +03:00
amd5536udc.h usb: gadget: Replace HTTP links with HTTPS ones 2020-07-15 16:33:52 +02:00
amd5536udc_pci.c usb: gadget: Replace HTTP links with HTTPS ones 2020-07-15 16:33:52 +02:00
at91_udc.c
at91_udc.h
atmel_usba_udc.c usb: gadget: udc: atmel: update endpoint allocation for sam9x60 2020-09-24 11:56:17 +03:00
atmel_usba_udc.h usb: gadget: udc: atmel: update endpoint allocation for sam9x60 2020-09-24 11:56:17 +03:00
bcm63xx_udc.c usb: gadget: bcm63xx_udc: fix up the error of undeclared usb_debug_root 2020-10-02 09:57:43 +03:00
core.c usb: gadget: core: do not try to disconnect gadget if it is not connected 2020-10-02 09:57:43 +03:00
dummy_hcd.c usb: gadget: Use fallthrough pseudo-keyword 2020-07-10 08:55:18 +02:00
fotg210-udc.c
fotg210.h
fsl_mxc_udc.c
fsl_qe_udc.c usb/gadget: fsl_qe_udc: convert tasklets to use new tasklet_setup() API 2020-08-18 13:00:01 +02:00
fsl_qe_udc.h
fsl_udc_core.c usb: gadget: fix spelling mistake "Dectected" -> "Detected" 2020-10-02 09:57:43 +03:00
fsl_usb2_udc.h
fusb300_udc.c
fusb300_udc.h
goku_udc.c usb: gadget: goku_udc: fix potential crashes in probe 2020-10-27 10:55:45 +02:00
goku_udc.h
gr_udc.c Linux 5.8-rc6 2020-07-20 09:41:30 +02:00
gr_udc.h usb: gadget: Replace HTTP links with HTTPS ones 2020-07-15 16:33:52 +02:00
Kconfig
lpc32xx_udc.c usb: gadget: lpc32xx_udc: Convert to DEFINE_SHOW_ATTRIBUTE 2020-10-02 09:57:39 +03:00
m66592-udc.c
m66592-udc.h
Makefile
max3420_udc.c usb: gadget: Replace HTTP links with HTTPS ones 2020-07-15 16:33:52 +02:00
mv_u3d.h
mv_u3d_core.c usb: gadget: udc: mv_u3d_core: Remove unused static const 'driver_desc' 2020-07-09 17:19:58 +02:00
mv_udc.h
mv_udc_core.c usb: gadget: udc: mv_udc_core: Remove unused static const variable 'driver_desc' 2020-07-09 17:19:57 +02:00
net2272.c USB: UDC: net2272: Fix memory leaks 2020-10-02 09:57:42 +03:00
net2272.h USB: UDC: net2272: Fix memory leaks 2020-10-02 09:57:42 +03:00
net2280.c USB: changes for v5.10 merge window 2020-10-03 15:59:57 +02:00
net2280.h USB: UDC: net2280: Fix memory leaks 2020-10-02 09:57:42 +03:00
omap_udc.c usb: gadget: Use fallthrough pseudo-keyword 2020-07-10 08:55:18 +02:00
omap_udc.h
pch_udc.c usb: gadget: pch_udc: Convert to use GPIO descriptors 2020-10-02 09:57:38 +03:00
pxa25x_udc.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pxa25x_udc.h
pxa27x_udc.c usb: gadget: udc: pxa27x_udc: Fix a bunch of kerneldoc issues 2020-07-09 17:19:56 +02:00
pxa27x_udc.h
r8a66597-udc.c usb: gadget: r8a66597: convert to devm_platform_ioremap_resource_byname 2020-07-29 16:49:38 +02:00
r8a66597-udc.h
renesas_usb3.c
s3c-hsudc.c usb: gadget: s3c-hsudc: remove platform header dependency 2020-08-19 20:58:27 +02:00
s3c2410_udc.c usb: gadget: s3c: Remove unused 'udc' variable 2020-10-02 09:57:43 +03:00
s3c2410_udc.h usb: gadget: s3c: use platform resources 2020-08-19 20:58:22 +02:00
s3c2410_udc_regs.h usb: gadget: s3c: use platform resources 2020-08-19 20:58:22 +02:00
snps_udc_core.c USB/Thunderbolt patches for 5.9-rc1 2020-08-05 12:13:10 -07:00
snps_udc_plat.c
tegra-xudc.c usb: gadget: tegra-xudc: Do not print errors on probe deferral 2020-10-02 09:57:43 +03:00
trace.c
trace.h
udc-xilinx.c