From owner-svn-src-all@FreeBSD.ORG Tue Apr 14 19:20:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2CD01065714; Tue, 14 Apr 2009 19:20:27 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF3D58FC2B; Tue, 14 Apr 2009 19:20:27 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n3EJKRte017304; Tue, 14 Apr 2009 19:20:27 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n3EJKReU017303; Tue, 14 Apr 2009 19:20:27 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200904141920.n3EJKReU017303@svn.freebsd.org> From: Randall Stewart Date: Tue, 14 Apr 2009 19:20:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r191073 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2009 19:20:29 -0000 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) {