diff options
author | trociny <trociny@FreeBSD.org> | 2012-02-21 19:40:13 +0000 |
---|---|---|
committer | trociny <trociny@FreeBSD.org> | 2012-02-21 19:40:13 +0000 |
commit | 05b0baa9d7dec6b685d001a414527a5ed422f70a (patch) | |
tree | 7a3a772b553da8d2811dd1f7b3a2972626f2aae1 /sys/kern/uipc_usrreq.c | |
parent | 3d90737625e8b5b067bfd781f6f496b5473c9d72 (diff) | |
download | FreeBSD-src-05b0baa9d7dec6b685d001a414527a5ed422f70a.zip FreeBSD-src-05b0baa9d7dec6b685d001a414527a5ed422f70a.tar.gz |
unp_connect() may use a shared lock on the vnode to fetch the socket.
Suggested by: jhb
Reviewed by: jhb, kib, rwatson
MFC after: 2 weeks
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r-- | sys/kern/uipc_usrreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 3a439ec..33365ee 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1273,8 +1273,8 @@ unp_connect(struct socket *so, struct sockaddr *nam, struct thread *td) 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; |