svn commit: r229637 - stable/9/sys/netinet6
John Baldwin
jhb at FreeBSD.org
Thu Jan 5 19:56:30 UTC 2012
Author: jhb
Date: Thu Jan 5 19:56:30 2012
New Revision: 229637
URL: http://svn.freebsd.org/changeset/base/229637
Log:
MFC 228866:
Fix a bug where TAILQ_FIRST(&V_ifnet) was accessed without holding the
proper lock.
Modified:
stable/9/sys/netinet6/icmp6.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/amd64/include/xen/ (props changed)
stable/9/sys/boot/ (props changed)
stable/9/sys/boot/i386/efi/ (props changed)
stable/9/sys/boot/ia64/efi/ (props changed)
stable/9/sys/boot/ia64/ski/ (props changed)
stable/9/sys/boot/powerpc/boot1.chrp/ (props changed)
stable/9/sys/boot/powerpc/ofw/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
stable/9/sys/conf/ (props changed)
stable/9/sys/contrib/dev/acpica/ (props changed)
stable/9/sys/contrib/octeon-sdk/ (props changed)
stable/9/sys/contrib/pf/ (props changed)
stable/9/sys/contrib/x86emu/ (props changed)
Modified: stable/9/sys/netinet6/icmp6.c
==============================================================================
--- stable/9/sys/netinet6/icmp6.c Thu Jan 5 19:53:17 2012 (r229636)
+++ stable/9/sys/netinet6/icmp6.c Thu Jan 5 19:56:30 2012 (r229637)
@@ -1851,7 +1851,7 @@ static int
ni6_store_addrs(struct icmp6_nodeinfo *ni6, struct icmp6_nodeinfo *nni6,
struct ifnet *ifp0, int resid)
{
- struct ifnet *ifp = ifp0 ? ifp0 : TAILQ_FIRST(&V_ifnet);
+ struct ifnet *ifp;
struct in6_ifaddr *ifa6;
struct ifaddr *ifa;
struct ifnet *ifp_dep = NULL;
@@ -1864,6 +1864,7 @@ ni6_store_addrs(struct icmp6_nodeinfo *n
return (0); /* needless to copy */
IFNET_RLOCK_NOSLEEP();
+ ifp = ifp0 ? ifp0 : TAILQ_FIRST(&V_ifnet);
again:
for (; ifp; ifp = TAILQ_NEXT(ifp, if_list)) {
More information about the svn-src-stable-9
mailing list