svn commit: r297745 - projects/vnet/sys/net

Bjoern A. Zeeb bz at FreeBSD.org
Sat Apr 9 13:01:41 UTC 2016


Author: bz
Date: Sat Apr  9 13:01:40 2016
New Revision: 297745
URL: https://svnweb.freebsd.org/changeset/base/297745

Log:
  Always drain the taskq on interface move/detach.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/vnet/sys/net/if.c

Modified: projects/vnet/sys/net/if.c
==============================================================================
--- projects/vnet/sys/net/if.c	Sat Apr  9 12:17:31 2016	(r297744)
+++ projects/vnet/sys/net/if.c	Sat Apr  9 13:01:40 2016	(r297745)
@@ -959,6 +959,11 @@ if_detach_internal(struct ifnet *ifp, in
 	/* The one thing we have to do. */
 	if_delgroups(ifp);
 
+	/*
+	 * Remove/wait for pending events.
+	 */
+	taskqueue_drain(taskqueue_swi, &ifp->if_linktask);
+
 	if (!vmove && !shutdown &&
 	    ifp->if_vnet->vnet_state <= SI_SUB_PSEUDO_DONE)
 		return (ENOENT);
@@ -968,11 +973,6 @@ if_detach_internal(struct ifnet *ifp, in
 		*ifcp = if_clone_findifc(ifp);
 
 	/*
-	 * Remove/wait for pending events.
-	 */
-	taskqueue_drain(taskqueue_swi, &ifp->if_linktask);
-
-	/*
 	 * Remove routes and flush queues.
 	 */
 	if_down(ifp);


More information about the svn-src-projects mailing list