svn commit: r231166 - stable/8/sys/netinet6
John Baldwin
jhb at FreeBSD.org
Tue Feb 7 22:13:54 UTC 2012
Author: jhb
Date: Tue Feb 7 22:13:54 2012
New Revision: 231166
URL: http://svn.freebsd.org/changeset/base/231166
Log:
MFC 229465: Use correct locking when traversing interface address list.
Modified:
stable/8/sys/netinet6/in6.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)
stable/8/sys/dev/e1000/ (props changed)
Modified: stable/8/sys/netinet6/in6.c
==============================================================================
--- stable/8/sys/netinet6/in6.c Tue Feb 7 22:13:38 2012 (r231165)
+++ stable/8/sys/netinet6/in6.c Tue Feb 7 22:13:54 2012 (r231166)
@@ -2128,9 +2128,7 @@ in6_ifawithifp(struct ifnet *ifp, struct
IF_ADDR_UNLOCK(ifp);
return (besta);
}
- IF_ADDR_UNLOCK(ifp);
- IN6_IFADDR_RLOCK();
TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
@@ -2148,10 +2146,10 @@ in6_ifawithifp(struct ifnet *ifp, struct
if (ifa != NULL)
ifa_ref(ifa);
- IN6_IFADDR_RUNLOCK();
+ IF_ADDR_UNLOCK(ifp);
return (struct in6_ifaddr *)ifa;
}
- IN6_IFADDR_RUNLOCK();
+ IF_ADDR_UNLOCK(ifp);
/* use the last-resort values, that are, deprecated addresses */
if (dep[0])
More information about the svn-src-all
mailing list