summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2017-05-09 09:37:25 +0000
committermpi <mpi@openbsd.org>2017-05-09 09:37:25 +0000
commit919325fa77933d4893940d864469618947c38ee9 (patch)
tree769a46dad893fedc7430940cd5e49fb9f65f1d63
parentStop considering some sleeping threads are running. (diff)
downloadwireguard-openbsd-919325fa77933d4893940d864469618947c38ee9.tar.xz
wireguard-openbsd-919325fa77933d4893940d864469618947c38ee9.zip
Convert a splsoftnet()/splx() dance to NET_ASSERT_LOCKED().
pfctlinput() is only called in the input path with the NET_LOCK() held. ok bluhm@
-rw-r--r--sys/kern/uipc_domain.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c
index 4a07e73fb9c..1649ad5f82b 100644
--- a/sys/kern/uipc_domain.c
+++ b/sys/kern/uipc_domain.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_domain.c,v 1.49 2017/02/27 19:16:56 claudio Exp $ */
+/* $OpenBSD: uipc_domain.c,v 1.50 2017/05/09 09:37:25 mpi Exp $ */
/* $NetBSD: uipc_domain.c,v 1.14 1996/02/09 19:00:44 christos Exp $ */
/*
@@ -221,15 +221,15 @@ pfctlinput(int cmd, struct sockaddr *sa)
{
struct domain *dp;
struct protosw *pr;
- int i, s;
+ int i;
+
+ NET_ASSERT_LOCKED();
- s = splsoftnet();
for (i = 0; (dp = domains[i]) != NULL; i++) {
for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
if (pr->pr_ctlinput)
(*pr->pr_ctlinput)(cmd, sa, 0, NULL);
}
- splx(s);
}
void