svn commit: r233802 - stable/8/sys/kern
Mikolaj Golub
trociny at FreeBSD.org
Mon Apr 2 18:54:11 UTC 2012
Author: trociny
Date: Mon Apr 2 18:54:10 2012
New Revision: 233802
URL: http://svn.freebsd.org/changeset/base/233802
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/8/sys/kern/uipc_usrreq.c
Directory Properties:
stable/8/sys/ (props changed)
Modified: stable/8/sys/kern/uipc_usrreq.c
==============================================================================
--- stable/8/sys/kern/uipc_usrreq.c Mon Apr 2 18:52:52 2012 (r233801)
+++ stable/8/sys/kern/uipc_usrreq.c Mon Apr 2 18:54:10 2012 (r233802)
@@ -1188,8 +1188,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-stable-8
mailing list