summaryrefslogtreecommitdiffstats
path: root/sys/net/raw_usrreq.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2017-03-07 09:23:27 +0000
committermpi <mpi@openbsd.org>2017-03-07 09:23:27 +0000
commit143ab7fc259aff7c83770a7286feb60e15721391 (patch)
tree6c133422618844e51864253d24d9b090a48feb05 /sys/net/raw_usrreq.c
parenttls_close() can return TLS_WANT_POLLIN/TLS_WANT_POLLOUT, handle them (diff)
downloadwireguard-openbsd-143ab7fc259aff7c83770a7286feb60e15721391.tar.xz
wireguard-openbsd-143ab7fc259aff7c83770a7286feb60e15721391.zip
Do not grab the NET_LOCK() for routing sockets operations.
The only function that need the lock is rtm_output() as it messes with the routing table. So grab the lock there since it is safe to sleep in a process context. ok bluhm@
Diffstat (limited to 'sys/net/raw_usrreq.c')
-rw-r--r--sys/net/raw_usrreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/raw_usrreq.c b/sys/net/raw_usrreq.c
index 1d777cec7e0..de4b7836a92 100644
--- a/sys/net/raw_usrreq.c
+++ b/sys/net/raw_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_usrreq.c,v 1.29 2017/03/03 15:48:02 bluhm Exp $ */
+/* $OpenBSD: raw_usrreq.c,v 1.30 2017/03/07 09:23:27 mpi Exp $ */
/* $NetBSD: raw_usrreq.c,v 1.11 1996/02/13 22:00:43 christos Exp $ */
/*
@@ -63,7 +63,7 @@ raw_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
int error = 0;
int len;
- NET_ASSERT_LOCKED();
+ soassertlocked(so);
if (req == PRU_CONTROL)
return (EOPNOTSUPP);