Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jul 2011 11:04:58 +0000 (UTC)
From:      Marko Zec <zec@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r224215 - stable/8/sys/netgraph
Message-ID:  <201107191104.p6JB4waO070019@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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