commit aadc42fe5b33eda0b42c8bcdf65f3e9644af8982 Author: Mikolaj Golub Date: Sat Feb 18 21:17:35 2012 +0200 unp_connect() may use a shared lock on the vnode to fetch the socket. Suggested by: jhb Reviewed by: jhb, kib, rwatson diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 0504d63..5eb3066 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;