svn commit: r183807 - head/sys/netinet6

Robert Watson rwatson at FreeBSD.org
Sun Oct 12 20:01:33 UTC 2008


Author: rwatson
Date: Sun Oct 12 20:01:32 2008
New Revision: 183807
URL: http://svn.freebsd.org/changeset/base/183807

Log:
  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.
  
  MFC after:	3 days

Modified:
  head/sys/netinet6/udp6_usrreq.c

Modified: head/sys/netinet6/udp6_usrreq.c
==============================================================================
--- head/sys/netinet6/udp6_usrreq.c	Sun Oct 12 19:23:02 2008	(r183806)
+++ head/sys/netinet6/udp6_usrreq.c	Sun Oct 12 20:01:32 2008	(r183807)
@@ -935,8 +935,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(&V_udbinfo);


More information about the svn-src-head mailing list