Hi Julian,
Thanks for reviewing this.
On Fri, 4 Sep 2026, Julian Anastasov wrote:
timer_delete_sync() can safely stop timer if it
is rearmed by its callback: __timer_delete_sync() waits
the callback to finish (the callback can rearm it) and
then detach it if pending. There must be another call flow
that can rearm it later, otherwise this patch is not needed.
During cleanup, we do not start the timer from
ip_vs_trash_put_dest(). May be I'm missing something?
You are right. I missed that the netns cleanup path passes cleanup=true
through ip_vs_flush() and __ip_vs_del_dest() to ip_vs_trash_put_dest().
The !cleanup guard therefore prevents that path from rearming
dest_trash_timer. If the timer callback is already running,
timer_delete_sync() waits for it to finish and removes any timer that the
callback rearmed before returning.
There is therefore no reachable post-cleanup rearm in this path, and the
proposed timer_shutdown_sync() change is unnecessary. Please consider the
v1 patch withdrawn; I will not send a v2.
Sorry for the noise, and thanks for pointing this out.
Regards,
Runyu