aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2024-11-14 19:39:12 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2024-11-14 19:39:12 +0000
commitfb7c1ac5ac499b8d5cbd928c5b2e9b3831ea29f7 (patch)
tree584d6b4b0c8aa28bbd059609d75adf40947cbf2f
parent20162e6f1c176c906c6d9d99fc66f6b0ed37dc05 (diff)
tcp: remove the looping on pcb count in tcp_destroy()
This was useful when TCP timers were not able to reliably stop. Note that in_pcbinfo_destroy() called later asserts that V_tcbinfo.ipi_count is 0. This reverts 806929d514234, b54e08e11ac15.
-rw-r--r--sys/netinet/tcp_subr.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 8bf011afe855..872ea6249051 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -58,7 +58,6 @@
#include <sys/refcount.h>
#include <sys/mbuf.h>
#include <sys/priv.h>
-#include <sys/proc.h>
#include <sys/sdt.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
@@ -1593,24 +1592,10 @@ SYSINIT(tcp_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, tcp_init, NULL);
static void
tcp_destroy(void *unused __unused)
{
- int n;
#ifdef TCP_HHOOK
int error;
#endif
- /*
- * All our processes are gone, all our sockets should be cleaned
- * up, which means, we should be past the tcp_discardcb() calls.
- * Sleep to let all tcpcb timers really disappear and cleanup.
- */
- for (;;) {
- INP_INFO_WLOCK(&V_tcbinfo);
- n = V_tcbinfo.ipi_count;
- INP_INFO_WUNLOCK(&V_tcbinfo);
- if (n == 0)
- break;
- pause("tcpdes", hz / 10);
- }
tcp_hc_destroy();
syncache_destroy();
in_pcbinfo_destroy(&V_tcbinfo);