kernel_samsung_a53x/drivers/usb/dwc3
Krzysztof Kozlowski 16cd1f0b0f usb: dwc3: st: fix probed platform device ref count on probe error path
commit ddfcfeba891064b88bb844208b43bef2ef970f0c upstream.

The probe function never performs any paltform device allocation, thus
error path "undo_platform_dev_alloc" is entirely bogus.  It drops the
reference count from the platform device being probed.  If error path is
triggered, this will lead to unbalanced device reference counts and
premature release of device resources, thus possible use-after-free when
releasing remaining devm-managed resources.

Fixes: f83fca0707c6 ("usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Link: https://lore.kernel.org/r/20240814093957.37940-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:20:55 +01:00
..
core-exynos.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.c usb: dwc3: core: Prevent USB core invalid event buffer address access 2024-11-23 23:20:55 +01:00
core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drd.c usb: dwc3: Fix default mode initialization 2024-11-18 12:10:58 +01:00
dwc3-exynos-otg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-exynos.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-exynos.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-haps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-imx8mp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-keystone.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-meson-g12a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-of-simple.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-omap.c usb: dwc3: omap: add missing depopulate in probe error path 2024-11-23 23:20:55 +01:00
dwc3-pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dwc3-qcom.c USB: dwc3: qcom: fix wakeup after probe deferral 2024-11-18 12:11:08 +01:00
dwc3-st.c usb: dwc3: st: fix probed platform device ref count on probe error path 2024-11-23 23:20:55 +01:00
ep0.c usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart 2024-11-18 12:12:46 +01:00
exynos-otg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_usb_tpmon.c Fix clang 16 errors treewide 2024-06-15 16:28:48 -03:00
exynos_usb_tpmon.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gadget.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gadget.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
host.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
io.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ulpi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00