summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2017-03-17 17:19:16 +0000
committermpi <mpi@openbsd.org>2017-03-17 17:19:16 +0000
commitb554ebfc5ef68dbcbabda317521525d69f01b5e5 (patch)
treeac930470c4b490bea0d5231c4d25bfe4bb8b51a8 /sys/kern/uipc_socket.c
parentcarp(4) code is always executed in the 'softnet' thread, so remove (diff)
downloadwireguard-openbsd-b554ebfc5ef68dbcbabda317521525d69f01b5e5.tar.xz
wireguard-openbsd-b554ebfc5ef68dbcbabda317521525d69f01b5e5.zip
Revert the NET_LOCK() and bring back pf's contention lock for release.
For the moment the NET_LOCK() is always taken by threads running under KERNEL_LOCK(). That means it doesn't buy us anything except a possible deadlock that we did not spot. So make sure this doesn't happen, we'll have plenty of time in the next release cycle to stress test it. ok visa@
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 1bb5874d1fa..0d427de67c9 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket.c,v 1.180 2017/03/13 20:18:21 claudio Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.181 2017/03/17 17:19:16 mpi Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
@@ -1038,12 +1038,10 @@ sorflush(struct socket *so)
{
struct sockbuf *sb = &so->so_rcv;
struct protosw *pr = so->so_proto;
- sa_family_t af = pr->pr_domain->dom_family;
struct sockbuf asb;
sb->sb_flags |= SB_NOINTR;
- sblock(sb, M_WAITOK,
- (af != PF_LOCAL && af != PF_ROUTE) ? &netlock : NULL);
+ sblock(sb, M_WAITOK, NULL);
socantrcvmore(so);
sbunlock(sb);
asb = *sb;