Date: Tue, 7 Feb 2012 22:13:54 +0000 (UTC) From: John Baldwin <jhb@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: r231166 - stable/8/sys/netinet6 Message-ID: <201202072213.q17MDsql009765@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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])
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202072213.q17MDsql009765>