svn commit: r188425 - stable/6/sys/kern

Robert Watson rwatson at FreeBSD.org
Mon Feb 9 15:23:02 PST 2009


Author: rwatson
Date: Mon Feb  9 23:23:00 2009
New Revision: 188425
URL: http://svn.freebsd.org/changeset/base/188425

Log:
  In unp_connect(), don't unlock the global UNIX domain socket lock when
  UNP_CONNECTING is set, as the caller will do that.
  
  (Due to significantly different locking in 7.0 and later, this fix
  applies only to stable/7).
  
  PR:		kern/128974
  Submitted by:	Larry Baird <lab at gta dot com>

Modified:
  stable/6/sys/kern/uipc_usrreq.c

Modified: stable/6/sys/kern/uipc_usrreq.c
==============================================================================
--- stable/6/sys/kern/uipc_usrreq.c	Mon Feb  9 22:59:22 2009	(r188424)
+++ stable/6/sys/kern/uipc_usrreq.c	Mon Feb  9 23:23:00 2009	(r188425)
@@ -1027,10 +1027,8 @@ unp_connect(struct socket *so, struct so
 	if (len <= 0)
 		return (EINVAL);
 	strlcpy(buf, soun->sun_path, len + 1);
-	if (unp->unp_flags & UNP_CONNECTING) {
-		UNP_UNLOCK();
+	if (unp->unp_flags & UNP_CONNECTING)
 		return (EALREADY);
-	}
 	unp->unp_flags |= UNP_CONNECTING;
 	UNP_UNLOCK();
 	sa = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK);


More information about the svn-src-stable mailing list