Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Oct 2019 15:33:54 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r353492 - head/sys/netinet6
Message-ID:  <201910141533.x9EFXsvK098353@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Mon Oct 14 15:33:53 2019
New Revision: 353492
URL: https://svnweb.freebsd.org/changeset/base/353492

Log:
  in6ifa_llaonifp() is never called from fast path, so do not require
  epoch being entered.

Modified:
  head/sys/netinet6/in6.c

Modified: head/sys/netinet6/in6.c
==============================================================================
--- head/sys/netinet6/in6.c	Mon Oct 14 14:31:21 2019	(r353491)
+++ head/sys/netinet6/in6.c	Mon Oct 14 15:33:53 2019	(r353492)
@@ -1548,13 +1548,14 @@ in6ifa_ifpwithaddr(struct ifnet *ifp, const struct in6
 struct in6_ifaddr *
 in6ifa_llaonifp(struct ifnet *ifp)
 {
+	struct epoch_tracker et;
 	struct sockaddr_in6 *sin6;
 	struct ifaddr *ifa;
 
-	NET_EPOCH_ASSERT();
 
 	if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)
 		return (NULL);
+	NET_EPOCH_ENTER(et);
 	CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
 		if (ifa->ifa_addr->sa_family != AF_INET6)
 			continue;
@@ -1564,6 +1565,7 @@ in6ifa_llaonifp(struct ifnet *ifp)
 		    IN6_IS_ADDR_MC_NODELOCAL(&sin6->sin6_addr))
 			break;
 	}
+	NET_EPOCH_EXIT(et);
 
 	return ((struct in6_ifaddr *)ifa);
 }



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