From owner-svn-src-all@FreeBSD.ORG Tue Oct 21 09:56:24 2008 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 2158E1065680; Tue, 21 Oct 2008 09:56:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EB678FC20; Tue, 21 Oct 2008 09:56:24 +0000 (UTC) (envelope-from rwatson@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 m9L9uNWK094991; Tue, 21 Oct 2008 09:56:23 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9L9uNBi094990; Tue, 21 Oct 2008 09:56:23 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810210956.m9L9uNBi094990@svn.freebsd.org> From: Robert Watson Date: Tue, 21 Oct 2008 09:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184119 - in stable/7/sys: . netinet6 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, 21 Oct 2008 09:56:24 -0000 Author: rwatson Date: Tue Oct 21 09:56:23 2008 New Revision: 184119 URL: http://svn.freebsd.org/changeset/base/184119 Log: Merge r183807 from head to stable/7: When disconnecting a UDPv6 socket, acquire the socket lock around the changing of the so_state field, as is done in UDPv4. Remove XXX locking comment. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/netinet6/udp6_usrreq.c Modified: stable/7/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/7/sys/netinet6/udp6_usrreq.c Tue Oct 21 09:55:49 2008 (r184118) +++ stable/7/sys/netinet6/udp6_usrreq.c Tue Oct 21 09:56:23 2008 (r184119) @@ -918,8 +918,9 @@ udp6_disconnect(struct socket *so) in6_pcbdisconnect(inp); inp->in6p_laddr = in6addr_any; - /* XXXRW: so_state locking? */ + SOCK_LOCK(so); so->so_state &= ~SS_ISCONNECTED; /* XXX */ + SOCK_UNLOCK(so); out: INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&udbinfo);