summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_usrreq.c
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2016-12-22 01:52:41 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2016-12-22 01:52:41 +0000
commit72d1076694a28bce648894484a1a9c0502ce1239 (patch)
tree4a0dee9f7de07d3153f03e516a95acd949a04e07 /sys/kern/uipc_usrreq.c
parent901248fef436c81dfd9c2dc40d39c4eb334427fa (diff)
Work around a NET_LOCK() recursion seen during NFS netboot:
sosend <- NET_LOCK() nfs_send nfs_request nfs_lookup VOP_LOOKUP vfs_lookup namei unp_connect uipc_usrreq soconnect <- NET_LOCK() sys_connect OK bluhm@ mpi@
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r--sys/kern/uipc_usrreq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 1f7584798dd..0aa7eb550bb 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_usrreq.c,v 1.104 2016/12/19 08:36:49 mpi Exp $ */
+/* $OpenBSD: uipc_usrreq.c,v 1.105 2016/12/22 01:52:40 visa Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */
/*
@@ -143,7 +143,10 @@ uipc_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
break;
case PRU_CONNECT:
+ /* XXXSMP breaks atomicity */
+ rw_exit_write(&netlock);
error = unp_connect(so, nam, p);
+ rw_enter_write(&netlock);
break;
case PRU_CONNECT2: