From owner-svn-src-head@FreeBSD.ORG Wed Nov 14 17:23:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D787EF9; Wed, 14 Nov 2012 17:23:49 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 65BF68FC08; Wed, 14 Nov 2012 17:23:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEHNn2Z016370; Wed, 14 Nov 2012 17:23:49 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEHNn6A016369; Wed, 14 Nov 2012 17:23:49 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201211141723.qAEHNn6A016369@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 14 Nov 2012 17:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243029 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 17:23:49 -0000 Author: ae Date: Wed Nov 14 17:23:48 2012 New Revision: 243029 URL: http://svnweb.freebsd.org/changeset/base/243029 Log: SCOPE6_LOCK protects V_sid_default, no need to acquire it without any access to V_sid_default. Sponsored by: Yandex LLC MFC after: 1 week Modified: head/sys/netinet6/scope6.c Modified: head/sys/netinet6/scope6.c ============================================================================== --- head/sys/netinet6/scope6.c Wed Nov 14 17:14:03 2012 (r243028) +++ head/sys/netinet6/scope6.c Wed Nov 14 17:23:48 2012 (r243029) @@ -139,7 +139,6 @@ scope6_set(struct ifnet *ifp, struct sco * interface addresses, routing table entries, PCB entries... */ - SCOPE6_LOCK(); for (i = 0; i < 16; i++) { if (idlist->s6id_list[i] && idlist->s6id_list[i] != sid->s6id_list[i]) { @@ -150,7 +149,6 @@ scope6_set(struct ifnet *ifp, struct sco if (i == IPV6_ADDR_SCOPE_INTFACELOCAL && idlist->s6id_list[i] != ifp->if_index) { IF_AFDATA_UNLOCK(ifp); - SCOPE6_UNLOCK(); return (EINVAL); } @@ -163,7 +161,6 @@ scope6_set(struct ifnet *ifp, struct sco * safety in later use. */ IF_AFDATA_UNLOCK(ifp); - SCOPE6_UNLOCK(); return (EINVAL); } @@ -175,7 +172,6 @@ scope6_set(struct ifnet *ifp, struct sco sid->s6id_list[i] = idlist->s6id_list[i]; } } - SCOPE6_UNLOCK(); IF_AFDATA_UNLOCK(ifp); return (error); @@ -193,9 +189,7 @@ scope6_get(struct ifnet *ifp, struct sco return (EINVAL); } - SCOPE6_LOCK(); *idlist = *sid; - SCOPE6_UNLOCK(); IF_AFDATA_UNLOCK(ifp); return (0); @@ -442,8 +436,6 @@ in6_setscope(struct in6_addr *in6, struc } scope = in6_addrscope(in6); - - SCOPE6_LOCK(); switch (scope) { case IPV6_ADDR_SCOPE_INTFACELOCAL: /* should be interface index */ zoneid = sid->s6id_list[IPV6_ADDR_SCOPE_INTFACELOCAL]; @@ -465,7 +457,6 @@ in6_setscope(struct in6_addr *in6, struc zoneid = 0; /* XXX: treat as global. */ break; } - SCOPE6_UNLOCK(); IF_AFDATA_UNLOCK(ifp); if (ret_id != NULL)