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
This commit is contained in:
parent
3d90737625
commit
05b0baa9d7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user