summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2016-12-19 08:36:49 +0000
committermpi <mpi@openbsd.org>2016-12-19 08:36:49 +0000
commit2b4720fc1ab1c786a246ad8a4a02064649d7c635 (patch)
treeaf02cdfe86f481705c092e14a90d4f5c242979a6 /sys/netinet/tcp_usrreq.c
parentfix uninitialised variable warnings from clang (diff)
downloadwireguard-openbsd-2b4720fc1ab1c786a246ad8a4a02064649d7c635.tar.xz
wireguard-openbsd-2b4720fc1ab1c786a246ad8a4a02064649d7c635.zip
Introduce the NET_LOCK() a rwlock used to serialize accesses to the parts
of the network stack that are not yet ready to be executed in parallel or where new sleeping points are not possible. This first pass replace all the entry points leading to ip_output(). This is done to not introduce new sleeping points when trying to acquire ART's write lock, needed when a new L2 entry is created via the RT_RESOLVE. Inputs from and ok bluhm@, ok dlg@
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 5b5f724022c..4906b4dc326 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.136 2016/11/21 09:09:06 mpi Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.137 2016/12/19 08:36:49 mpi Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -133,7 +133,7 @@ tcp_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,
int error = 0;
short ostate;
- splsoftassert(IPL_SOFTNET);
+ NET_ASSERT_LOCKED();
if (req == PRU_CONTROL) {
#ifdef INET6