Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Oct 2008 20:01:32 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r183807 - head/sys/netinet6
Message-ID:  <200810122001.m9CK1WAj054137@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810122001.m9CK1WAj054137>