kernel_samsung_a53x/drivers/usb/dwc3
Selvarasu Ganesan a19501ce86 usb: dwc3: core: Prevent USB core invalid event buffer address access
commit 14e497183df28c006603cc67fd3797a537eef7b9 upstream.

This commit addresses an issue where the USB core could access an
invalid event buffer address during runtime suspend, potentially causing
SMMU faults and other memory issues in Exynos platforms. The problem
arises from the following sequence.
        1. In dwc3_gadget_suspend, there is a chance of a timeout when
        moving the USB core to the halt state after clearing the
        run/stop bit by software.
        2. In dwc3_core_exit, the event buffer is cleared regardless of
        the USB core's status, which may lead to an SMMU faults and
        other memory issues. if the USB core tries to access the event
        buffer address.

To prevent this hardware quirk on Exynos platforms, this commit ensures
that the event buffer address is not cleared by software  when the USB
core is active during runtime suspend by checking its status before
clearing the buffer address.

Cc: stable <stable@kernel.org>
Signed-off-by: Selvarasu Ganesan <selvarasu.g@samsung.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20240815064836.1491-1-selvarasu.g@samsung.com
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 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03: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