Date: Tue, 14 Apr 2009 19:20:27 +0000 (UTC) From: Randall Stewart <rrs@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r191073 - head/sys/netinet Message-ID: <200904141920.n3EJKReU017303@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rrs Date: Tue Apr 14 19:20:27 2009 New Revision: 191073 URL: http://svn.freebsd.org/changeset/base/191073 Log: Add missing address lock when we look at the ifa list Modified: head/sys/netinet/sctp_bsd_addr.c Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Tue Apr 14 19:11:02 2009 (r191072) +++ head/sys/netinet/sctp_bsd_addr.c Tue Apr 14 19:20:27 2009 (r191073) @@ -189,11 +189,11 @@ sctp_is_desired_interface_type(struct if } + + static void sctp_init_ifns_for_vrf(int vrfid) { - - /* * Here we must apply ANY locks needed by the IFN we access and also * make sure we lock any IFA that exists as we float through the @@ -206,8 +206,8 @@ sctp_init_ifns_for_vrf(int vrfid) uint32_t ifa_flags; TAILQ_FOREACH(ifn, &MODULE_GLOBAL(MOD_NET, ifnet), if_list) { + IF_ADDR_LOCK(ifn); TAILQ_FOREACH(ifa, &ifn->if_addrlist, ifa_list) { - if (ifa->ifa_addr == NULL) { continue; } @@ -248,10 +248,10 @@ sctp_init_ifns_for_vrf(int vrfid) sctp_ifa->localifa_flags &= ~SCTP_ADDR_DEFER_USE; } } + IF_ADDR_UNLOCK(ifn); } } - void sctp_init_vrf_list(int vrfid) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904141920.n3EJKReU017303>