From 72d1076694a28bce648894484a1a9c0502ce1239 Mon Sep 17 00:00:00 2001 From: Visa Hankala Date: Thu, 22 Dec 2016 01:52:41 +0000 Subject: 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@ --- sys/kern/uipc_usrreq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/kern/uipc_usrreq.c') 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: -- cgit v1.2.3