summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_timer.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2016-11-28 11:12:45 +0000
committermpi <mpi@openbsd.org>2016-11-28 11:12:45 +0000
commitb74a9adab035c921a2325bdf124b65dbdf8969fd (patch)
treebc7b46d28d036c9d93bd56d3ec4b518d024d9cae /sys/netinet/tcp_timer.c
parentAllow to build kernels without IPSEC but with PIPEX. (diff)
downloadwireguard-openbsd-b74a9adab035c921a2325bdf124b65dbdf8969fd.tar.xz
wireguard-openbsd-b74a9adab035c921a2325bdf124b65dbdf8969fd.zip
Assert that every slow/fast timeout routine is called at IPL_SOFTNET.
This removes multipe recursive splsoftnet()/splx() dances.
Diffstat (limited to 'sys/netinet/tcp_timer.c')
-rw-r--r--sys/netinet/tcp_timer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 698cb0bb0c9..661fe0c8b6d 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_timer.c,v 1.51 2016/11/07 09:08:06 mpi Exp $ */
+/* $OpenBSD: tcp_timer.c,v 1.52 2016/11/28 11:12:45 mpi Exp $ */
/* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */
/*
@@ -129,13 +129,11 @@ tcp_delack(void *arg)
void
tcp_slowtimo(void)
{
- int s;
+ splsoftassert(IPL_SOFTNET);
- s = splsoftnet();
tcp_maxidle = TCPTV_KEEPCNT * tcp_keepintvl;
tcp_iss += TCP_ISSINCR2/PR_SLOWHZ; /* increment iss */
tcp_now++; /* for timestamps */
- splx(s);
}
/*