linux/drivers/usb/dwc2
Runyu Xiao fd772af951 USB: dwc2: shut down wakeup timer before freeing HCD state
dwc2_wakeup_detected() accesses the DWC2 host state and can rearm the
wakeup timer.  dwc2_hcd_free() currently deletes the timer only after
freeing host-owned state, and timer_delete() does not synchronize a
callback or prevent it from being queued again.

Stop and shut down the timer in dwc2_hcd_release(), before the HCD
resources are freed.  This covers both the HCD initialization error path
and normal HCD removal.

Fixes: 7359d482eb ("staging: HCD files for the DWC2 driver")
Cc: stable <stable@kernel.org>
Assisted-by: Codex:GPT-5
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://patch.msgid.link/20260904065323.4047026-1-runyu.xiao@seu.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-09-10 17:08:19 +02:00
..
core.c usb: dwc2: fix resume failure if dr_mode is host 2026-02-05 17:16:24 +01:00
core.h usb: dwc2: Add include defining struct pci_device_id 2026-07-03 07:38:15 +02:00
core_intr.c usb: dwc2: add missing @remotewakeup kernel-doc parameter 2026-07-10 15:56:06 +02:00
debug.h USB: dwc2: Use the correct style for SPDX License Identifier 2020-05-05 10:58:50 +03:00
debugfs.c usb: dwc2: debugfs: Print parameter no_clock_gating 2024-07-31 10:47:10 +02:00
drd.c usb: dwc2: drd: fix clock gating on USB role switch 2024-09-11 15:35:33 +02:00
gadget.c usb: dwc2: gadget: Exit partial power down state when changing USB pull-up 2026-08-14 10:48:41 +09:00
hcd.c USB: dwc2: shut down wakeup timer before freeing HCD state 2026-09-10 17:08:19 +02:00
hcd.h usb: dwc2: Remove redundant license text 2022-09-22 15:52:29 +02:00
hcd_ddma.c usb: dwc2: host: Fix dereference issue in DDMA completion flow. 2024-04-09 17:29:38 +02:00
hcd_intr.c usb: dwc2: remove WARN in dwc2_hcd_save_data_toggle 2026-05-22 11:35:56 +02:00
hcd_queue.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
hw.h Merge 6.9-rc2 into usb-next 2024-04-01 17:02:18 +02:00
Kconfig usb: use "prompt" instead of "bool" for choice prompts 2024-11-04 17:53:09 +09:00
Makefile usb: dwc2: override PHY input signals with usb role switch support 2020-10-02 13:29:13 +03:00
params.c usb: dwc2: Add support for 'maximum-speed' property 2025-09-12 14:03:10 +02:00
pci.c usb: dwc2: add pci_device_id driver_data parse support 2023-08-22 14:49:12 +02:00
platform.c usb: dwc2: fix hang during suspend if set as peripheral 2025-11-21 15:10:38 +01:00