From 226fb85d1963ec0159016598d4f908468e49ca44 Mon Sep 17 00:00:00 2001 From: Stephen Hurd Date: Fri, 2 Mar 2018 18:48:07 +0000 Subject: [PATCH] iflib: stop timer callout when stopping iflib_timer has been seen running after the interface had been removed. This change prevents that. Submitted by: matt.macy@joyent.com --- sys/net/iflib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 8a3dcdb3810..573330c8e13 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2267,6 +2267,10 @@ iflib_stop(if_ctx_t ctx) for (i = 0; i < scctx->isc_ntxqsets; i++, txq++) { /* make sure all transmitters have completed before proceeding XXX */ + CALLOUT_LOCK(txq); + callout_stop(&txq->ift_timer); + CALLOUT_UNLOCK(txq); + /* clean any enqueued buffers */ iflib_ifmp_purge(txq); /* Free any existing tx buffers. */