git: c7523e8cfbd0 - main - tcp: fix incorrect assertion
- Reply: Gleb Smirnoff : "Re: git: c7523e8cfbd0 - main - tcp: fix incorrect assertion"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 22 Oct 2026 13:40:51 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=c7523e8cfbd0fa8f8a9dc6c8864bf138b7cffde8
commit c7523e8cfbd0fa8f8a9dc6c8864bf138b7cffde8
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-10-22 13:38:31 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-10-22 13:40:29 +0000
tcp: fix incorrect assertion
tcp_autosndbuf() asserts that the buffer is locked, but it should assert
this about the send buffer, not the receive buffer.
Fixes: 7146ad04f18e ("tcp: refactor tcp_autosndbuf() and associated sysctls")
Reviewed by: tuexen
Sponsored by: Rubicon Communications, LLC ("Netgate")
---
sys/netinet/tcp_output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index d11a2b745382..b5f36d83f5a2 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -2154,7 +2154,7 @@ tcp_autosndbuf(struct tcpcb *tp, u_int sendwin)
struct socket *so = tptosocket(tp);
u_int lowat, newsize;
- SOCK_RECVBUF_LOCK_ASSERT(so);
+ SOCK_SENDBUF_LOCK_ASSERT(so);
if (!V_tcp_do_autosndbuf || (so->so_snd.sb_flags & SB_AUTOSIZE) == 0)
return;