Date: Thu, 5 Jan 2012 19:56: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: r229638 - stable/8/sys/netinet6 Message-ID: <201201051956.q05JusHp052795@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu Jan 5 19:56:54 2012 New Revision: 229638 URL: http://svn.freebsd.org/changeset/base/229638 Log: MFC 228866: Fix a bug where TAILQ_FIRST(&V_ifnet) was accessed without holding the proper lock. Modified: stable/8/sys/netinet6/icmp6.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) Modified: stable/8/sys/netinet6/icmp6.c ============================================================================== --- stable/8/sys/netinet6/icmp6.c Thu Jan 5 19:56:30 2012 (r229637) +++ stable/8/sys/netinet6/icmp6.c Thu Jan 5 19:56:54 2012 (r229638) @@ -1768,7 +1768,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; @@ -1781,6 +1781,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)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201051956.q05JusHp052795>