svn commit: r353425 - head/sys/net
Gleb Smirnoff
glebius at FreeBSD.org
Thu Oct 10 23:51:15 UTC 2019
Author: glebius
Date: Thu Oct 10 23:51:14 2019
New Revision: 353425
URL: https://svnweb.freebsd.org/changeset/base/353425
Log:
Don't use if_maddr_rlock() in tuntap(4), use epoch(9) directly instead.
Modified:
head/sys/net/if_tuntap.c
Modified: head/sys/net/if_tuntap.c
==============================================================================
--- head/sys/net/if_tuntap.c Thu Oct 10 23:50:32 2019 (r353424)
+++ head/sys/net/if_tuntap.c Thu Oct 10 23:51:14 2019 (r353425)
@@ -1151,6 +1151,7 @@ tuninit(struct ifnet *ifp)
{
struct tuntap_softc *tp = ifp->if_softc;
#ifdef INET
+ struct epoch_tracker et;
struct ifaddr *ifa;
#endif
@@ -1162,7 +1163,7 @@ tuninit(struct ifnet *ifp)
ifp->if_flags |= IFF_UP;
getmicrotime(&ifp->if_lastchange);
#ifdef INET
- if_addr_rlock(ifp);
+ NET_EPOCH_ENTER(et);
CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family == AF_INET) {
struct sockaddr_in *si;
@@ -1176,7 +1177,7 @@ tuninit(struct ifnet *ifp)
tp->tun_flags |= TUN_DSTADDR;
}
}
- if_addr_runlock(ifp);
+ NET_EPOCH_EXIT(et);
#endif
TUN_UNLOCK(tp);
} else {
More information about the svn-src-all
mailing list