Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Mar 2018 18:48:07 +0000 (UTC)
From:      Stephen Hurd <shurd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330289 - head/sys/net
Message-ID:  <201803021848.w22Im7Fl052826@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: shurd
Date: Fri Mar  2 18:48:07 2018
New Revision: 330289
URL: https://svnweb.freebsd.org/changeset/base/330289

Log:
  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

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==============================================================================
--- head/sys/net/iflib.c	Fri Mar  2 18:12:25 2018	(r330288)
+++ head/sys/net/iflib.c	Fri Mar  2 18:48:07 2018	(r330289)
@@ -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. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803021848.w22Im7Fl052826>