summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2016-09-13 07:50:36 +0000
committermpi <mpi@openbsd.org>2016-09-13 07:50:36 +0000
commitcc82254303a7d64efbab3a038bbd1e9afe777037 (patch)
treeab85a973d0e73477c886c0c8de795728d97300a1 /sys/kern/uipc_socket.c
parentRetire bridge(4) support. (diff)
downloadwireguard-openbsd-cc82254303a7d64efbab3a038bbd1e9afe777037.tar.xz
wireguard-openbsd-cc82254303a7d64efbab3a038bbd1e9afe777037.zip
Do not raise splsoftnet() recursively in soaccept().
This is not an issue right now, but it will become one when an non recursive lock will be used. ok claudio@
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 81435119f7d..9f89572a872 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket.c,v 1.157 2016/09/03 14:09:58 bluhm Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.158 2016/09/13 07:50:36 mpi Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
@@ -300,9 +300,10 @@ soabort(struct socket *so)
int
soaccept(struct socket *so, struct mbuf *nam)
{
- int s = splsoftnet();
int error = 0;
+ splsoftassert(IPL_SOFTNET);
+
if ((so->so_state & SS_NOFDREF) == 0)
panic("soaccept !NOFDREF: so %p, so_type %d", so, so->so_type);
so->so_state &= ~SS_NOFDREF;
@@ -312,7 +313,6 @@ soaccept(struct socket *so, struct mbuf *nam)
nam, NULL, curproc);
else
error = ECONNABORTED;
- splx(s);
return (error);
}