svn commit: r233801 - stable/9/sys/kern

Mikolaj Golub trociny at FreeBSD.org
Mon Apr 2 18:52:52 UTC 2012


Author: trociny
Date: Mon Apr  2 18:52:52 2012
New Revision: 233801
URL: http://svn.freebsd.org/changeset/base/233801

Log:
  MFC r231976:
  
  unp_connect() may use a shared lock on the vnode to fetch the socket.
  
  Suggested by:	jhb
  Reviewed by:	jhb, kib, rwatson

Modified:
  stable/9/sys/kern/uipc_usrreq.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/kern/uipc_usrreq.c
==============================================================================
--- stable/9/sys/kern/uipc_usrreq.c	Mon Apr  2 18:31:01 2012	(r233800)
+++ stable/9/sys/kern/uipc_usrreq.c	Mon Apr  2 18:52:52 2012	(r233801)
@@ -1272,8 +1272,8 @@ unp_connect(struct socket *so, struct so
 	UNP_PCB_UNLOCK(unp);
 
 	sa = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK);
-	NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKLEAF, UIO_SYSSPACE, buf,
-	    td);
+	NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKSHARED | LOCKLEAF,
+	    UIO_SYSSPACE, buf, td);
 	error = namei(&nd);
 	if (error)
 		vp = NULL;


More information about the svn-src-all mailing list