Re: [PATCH] bus: mhi: host: Shut down the health check timer on removal
From: Jeff Hugo
Date: Fri Oct 30 2026 - 12:24:36 EST
On 10/11/2026 12:51 PM, Myeonghun Pak wrote:
The recovery worker rearms health_check_timer after a successful deviceReviewed-by: Jeff Hugo <jeff.hugo@xxxxxxxxxxxxxxxx>
recovery. Deleting the timer before cancel_work_sync() does not prevent
an already running recovery worker from adding it again while removal
waits for that worker. The timer can then run after the controller and
the managed mhi_pci_device have been released.
Use timer_shutdown_sync() before cancelling recovery_work. This waits for
the timer callback and rejects subsequent rearming, including rearming
by the worker being cancelled. Keep the reversible timer deletion used
by suspend and reset paths.
This issue was found by static analysis.
Fixes: 8562d4fe34a3 ("mhi: pci_generic: Add health-check")
Assisted-by: LLM
Co-developed-by: Ijae Kim <ae878000@xxxxxxxxx>
Signed-off-by: Ijae Kim <ae878000@xxxxxxxxx>
Signed-off-by: Myeonghun Pak <mhun512@xxxxxxxxx>