Index: sys/netinet/tcp_timer.c =================================================================== --- sys/netinet/tcp_timer.c +++ sys/netinet/tcp_timer.c @@ -941,21 +941,9 @@ } if (tp->t_timers->tt_flags & timer_type) { - if (callout_stop(t_callout) && - (tp->t_timers->tt_flags & f_reset)) { + if (callout_drain_async(t_callout, f_callout, tp)) { + /* callout is no longer executing */ tp->t_timers->tt_flags &= ~(timer_type | f_reset); - } else { - /* - * Can't stop the callout, defer tcpcb actual deletion - * to the last tcp timer discard callout. - * The TT_STOPPED flag will ensure that no tcp timer - * callouts can be restarted on our behalf, and - * past this point currently running callouts waiting - * on inp lock will return right away after the - * classical check for callout reset/stop events: - * callout_pending() || !callout_active() - */ - callout_reset(t_callout, 1, f_callout, tp); } } }