svn commit: r184119 - in stable/7/sys: . netinet6

Robert Watson rwatson at FreeBSD.org
Tue Oct 21 09:56:24 UTC 2008


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);


More information about the svn-src-all mailing list