Commit d9407ff11809 ("pds_core: Prevent health thread from running during reset/remove") stops the health thread with cancel_work_sync() before a reset, but a devcmd timeout during pdsc_fw_down() re-queues health_work, so pdsc_health_thread() runs again mid-reset and double allocates the core DMA queues via pdsc_fw_up(). Only the reset path is affected. On remove, PDSC_S_STOPPING_DRIVER gates the health thread. Use disable_work_sync() instead, it cancels the pending work and disables the item, so the pdsc_fw_down() re-queue becomes a no-op. pdsc_restart_health_thread() re-enables it with enable_work(). Fixes: d9407ff11809 ("pds_core: Prevent health thread from running during reset/remove") Suggested-by: Jakub Kicinski Reported-by: sashiko-bot Closes: https://sashiko.dev/#/patchset/20260629200358.2626129-1-nikhil.rao%40amd.com?part=2 Signed-off-by: Nikhil P. Rao --- drivers/net/ethernet/amd/pds_core/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amd/pds_core/main.c b/drivers/net/ethernet/amd/pds_core/main.c index 22db78343eb0..3e34350b169b 100644 --- a/drivers/net/ethernet/amd/pds_core/main.c +++ b/drivers/net/ethernet/amd/pds_core/main.c @@ -465,7 +465,7 @@ static void pdsc_stop_health_thread(struct pdsc *pdsc) timer_shutdown_sync(&pdsc->wdtimer); if (pdsc->health_work.func) - cancel_work_sync(&pdsc->health_work); + disable_work_sync(&pdsc->health_work); } static void pdsc_restart_health_thread(struct pdsc *pdsc) @@ -473,6 +473,7 @@ static void pdsc_restart_health_thread(struct pdsc *pdsc) if (pdsc->pdev->is_virtfn) return; + enable_work(&pdsc->health_work); timer_setup(&pdsc->wdtimer, pdsc_wdtimer_cb, 0); mod_timer(&pdsc->wdtimer, jiffies + 1); } -- 2.43.0