From 2278f9927d4bda9fefe1911bca7448a949130652 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Wed, 18 Aug 2010 09:28:12 +0000 Subject: [PATCH] When calculating the expected memory size for userspace, also take the number of syncache entries into account for the surplus we add to account for a possible increase of records in the re-entry window. Discussed with: jhb, silby MFC after: 1 week --- sys/netinet/tcp_subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index bfa3e663f00..f23a5404912 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1022,7 +1022,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) if (req->oldptr == NULL) { m = syncache_pcbcount(); n = V_tcbinfo.ipi_count; - n += imax(n / 8, 10); + n += imax((m + n) / 8, 10); req->oldidx = 2 * (sizeof xig) + (m + n) * sizeof(struct xtcpcb); return (0);