svn commit: r224215 - stable/8/sys/netgraph

Marko Zec zec at FreeBSD.org
Tue Jul 19 11:04:58 UTC 2011


Author: zec
Date: Tue Jul 19 11:04:58 2011
New Revision: 224215
URL: http://svn.freebsd.org/changeset/base/224215

Log:
  MFC r224107:
    Clear pending ifnet events, in an attempt at preventing
    ng_ether_link_state() from being dispatched after we have
    cleared our IFP2NG(ifp).

Modified:
  stable/8/sys/netgraph/ng_ether.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/netgraph/ng_ether.c
==============================================================================
--- stable/8/sys/netgraph/ng_ether.c	Tue Jul 19 10:53:47 2011	(r224214)
+++ stable/8/sys/netgraph/ng_ether.c	Tue Jul 19 11:04:58 2011	(r224215)
@@ -55,6 +55,7 @@
 #include <sys/proc.h>
 #include <sys/syslog.h>
 #include <sys/socket.h>
+#include <sys/taskqueue.h>
 
 #include <net/if.h>
 #include <net/if_dl.h>
@@ -336,6 +337,7 @@ ng_ether_detach(struct ifnet *ifp)
 	const node_p node = IFP2NG(ifp);
 	const priv_p priv = NG_NODE_PRIVATE(node);
 
+	taskqueue_drain(taskqueue_swi, &ifp->if_linktask);
 	NG_NODE_REALLY_DIE(node);	/* Force real removal of node */
 	/*
 	 * We can't assume the ifnet is still around when we run shutdown


More information about the svn-src-all mailing list