summaryrefslogtreecommitdiff
path: root/sys/netinet6/ip6_divert.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-12-19 08:36:51 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-12-19 08:36:51 +0000
commit347b9bada49618963c84880ec8c3c23c96aa0017 (patch)
treed431218ec3017a484e7de695c002a79a0e68cc86 /sys/netinet6/ip6_divert.c
parentc22be17b5bebb223df391aa82dfc7704004aafa7 (diff)
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/netinet6/ip6_divert.c')
-rw-r--r--sys/netinet6/ip6_divert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/ip6_divert.c b/sys/netinet6/ip6_divert.c
index 42bea1ad86b..fd435358b12 100644
--- a/sys/netinet6/ip6_divert.c
+++ b/sys/netinet6/ip6_divert.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_divert.c,v 1.42 2016/11/21 09:09:06 mpi Exp $ */
+/* $OpenBSD: ip6_divert.c,v 1.43 2016/12/19 08:36:50 mpi Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -251,7 +251,7 @@ divert6_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *addr,
struct inpcb *inp = sotoinpcb(so);
int error = 0;
- splsoftassert(IPL_SOFTNET);
+ NET_ASSERT_LOCKED();
if (req == PRU_CONTROL) {
return (in6_control(so, (u_long)m, (caddr_t)addr,