summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-03-17 17:19:18 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-03-17 17:19:18 +0000
commitda29ef7d653b7e20822ba08ddc7013b139d46125 (patch)
treea361e4b2dccdfd5f25e777e214373034ead679fc /sys/kern/uipc_socket.c
parent97968578fca98adc82352fa265539848765983c7 (diff)
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;