linux/drivers/usb/dwc3
Krzysztof Kozlowski ddfcfeba89 usb: dwc3: st: fix probed platform device ref count on probe error path
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: f83fca0707 ("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-08-22 17:34:26 +08:00
..
core.c usb: dwc3: core: Prevent USB core invalid event buffer address access 2024-08-22 16:14:24 +08:00
core.h usb: dwc3: enable CCI support for AMD-xilinx DWC3 controller 2024-07-10 13:56:36 +02:00
debug.h usb: dwc3: Add function suspend and function wakeup support 2023-03-29 10:27:01 +02:00
debugfs.c usb: dwc3: debugfs: Resume dwc3 before accessing registers 2023-05-13 17:56:22 +09:00
drd.c usb: dwc3: core: Refactor PHY logic to support Multiport Controller 2024-04-23 19:56:09 -07:00
dwc3-am62.c usb: dwc3-am62: add workaround for Errata i2409 2024-03-05 13:23:17 +00:00
dwc3-exynos.c usb: dwc3: exynos: add support for Google Tensor gs101 2024-04-30 19:32:06 +02:00
dwc3-haps.c usb: dwc3: haps: Constify the software node 2021-02-04 15:42:06 +01:00
dwc3-imx8mp.c usb: dwc3: imx8mp: Fix smatch warning 2023-12-15 18:27:40 +01:00
dwc3-keystone.c usb: dwc3: remove unnecessary platform_set_drvdata() 2023-08-22 14:45:19 +02:00
dwc3-meson-g12a.c usb: dwc3: meson-g12a: do post init to fix broken usb after resumption 2023-08-22 14:44:09 +02:00
dwc3-octeon.c just cleanups and fixes 2023-09-07 10:35:14 -07:00
dwc3-of-simple.c usb: dwc3: of-simple: Add compatible for hi3798mv200 DWC3 controller 2024-03-05 13:23:05 +00:00
dwc3-omap.c usb: dwc3: omap: add missing depopulate in probe error path 2024-08-22 17:29:16 +08:00
dwc3-pci.c usb: dwc3: pci: add support for the Intel Panther Lake 2024-07-03 16:06:32 +02:00
dwc3-qcom.c usb: dwc3: qcom: Add multiport suspend/resume support for wrapper 2024-04-23 19:56:09 -07:00
dwc3-rtk.c usb: dwc3: add missing of_node_put and platform_device_put 2023-11-21 15:30:43 +01:00
dwc3-st.c usb: dwc3: st: fix probed platform device ref count on probe error path 2024-08-22 17:34:26 +08:00
dwc3-xilinx.c usb: dwc3: xilinx: add missing depopulate in probe error path 2024-08-22 17:29:17 +08:00
ep0.c usb: dwc3: ep0: Don't reset resource alloc flag (including ep0) 2024-08-22 17:34:10 +08:00
gadget.c usb: dwc3: Wait unconditionally after issuing EndXfer command 2024-05-10 10:35:56 +01:00
gadget.h Merge 6.8-rc5 into usb-next 2024-02-19 09:13:29 +01:00
host.c usb: dwc3: Support quirk for writing high-low order 2024-06-20 19:30:30 +02:00
io.h usb: dwc3: fix incorrect kernel-doc comment syntax in files 2021-04-02 15:20:51 +02:00
Kconfig usb: dwc3: qcom: Remove ACPI support from glue driver 2024-03-05 13:06:14 +00:00
Makefile usb: dwc3: add Realtek DHC RTD SoC dwc3 glue layer driver 2023-10-02 14:05:24 +02:00
trace.c usb: dwc3: fix incorrect kernel-doc comment syntax in files 2021-04-02 15:20:51 +02:00
trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
ulpi.c