summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_ether.c
diff options
context:
space:
mode:
authorhsu <hsu@FreeBSD.org>2002-12-22 05:35:03 +0000
committerhsu <hsu@FreeBSD.org>2002-12-22 05:35:03 +0000
commit82e1e3bab0d3abe1018a0b56559c154485f2f676 (patch)
treed0f9ee7e6f9d8014e6f8f94ab6965e85c268792e /sys/netgraph/ng_ether.c
parent2afef11c570b7b725c3145fc710f8dcd8d7ed4e0 (diff)
downloadFreeBSD-src-82e1e3bab0d3abe1018a0b56559c154485f2f676.zip
FreeBSD-src-82e1e3bab0d3abe1018a0b56559c154485f2f676.tar.gz
SMP locking for ifnet list.
Diffstat (limited to 'sys/netgraph/ng_ether.c')
-rw-r--r--sys/netgraph/ng_ether.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c
index da2012f..041999c 100644
--- a/sys/netgraph/ng_ether.c
+++ b/sys/netgraph/ng_ether.c
@@ -728,11 +728,13 @@ ng_ether_mod_event(module_t mod, int event, void *data)
ng_ether_input_orphan_p = ng_ether_input_orphan;
/* Create nodes for any already-existing Ethernet interfaces */
+ IFNET_RLOCK();
TAILQ_FOREACH(ifp, &ifnet, if_link) {
if (ifp->if_type == IFT_ETHER
|| ifp->if_type == IFT_L2VLAN)
ng_ether_attach(ifp);
}
+ IFNET_RUNLOCK();
break;
case MOD_UNLOAD:
OpenPOWER on IntegriCloud