summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2016-12-20 14:10:00 +0000
committermpi <mpi@openbsd.org>2016-12-20 14:10:00 +0000
commitfa77a12a8c3d6ce8abf71aa56a6bebd3b6871abb (patch)
treea426bd4136b5b864986082d495032489a69930ad /sys/netinet/tcp_usrreq.c
parentfix use of uninitialised variables (diff)
downloadwireguard-openbsd-fa77a12a8c3d6ce8abf71aa56a6bebd3b6871abb.tar.xz
wireguard-openbsd-fa77a12a8c3d6ce8abf71aa56a6bebd3b6871abb.zip
Kill recursive splsoftnet()/splx() in tcp_ctloutput().
ok mikeb@, bluhm@
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 4906b4dc326..ed781bafdd7 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.137 2016/12/19 08:36:49 mpi Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.138 2016/12/20 14:10:00 mpi Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -451,16 +451,14 @@ int
tcp_ctloutput(int op, struct socket *so, int level, int optname,
struct mbuf **mp)
{
- int error = 0, s;
+ int error = 0;
struct inpcb *inp;
struct tcpcb *tp;
struct mbuf *m;
int i;
- s = splsoftnet();
inp = sotoinpcb(so);
if (inp == NULL) {
- splx(s);
if (op == PRCO_SETOPT)
(void) m_free(*mp);
return (ECONNRESET);
@@ -479,7 +477,6 @@ tcp_ctloutput(int op, struct socket *so, int level, int optname,
error = EAFNOSUPPORT; /*?*/
break;
}
- splx(s);
return (error);
}
tp = intotcpcb(inp);
@@ -606,7 +603,6 @@ tcp_ctloutput(int op, struct socket *so, int level, int optname,
}
break;
}
- splx(s);
return (error);
}