mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] tcp: fix false exhaustion of odd-sized bind port ranges
@ 2026-11-06 17:14 Florin Badita-Nistor
  2026-11-06 17:14 ` [PATCH net-next v2 1/2] tcp: avoid false bind exhaustion with odd-sized " Florin Badita-Nistor
  2026-11-06 17:14 ` [PATCH net-next v2 2/2] selftests/net: cover odd-sized local port ranges with one free port Florin Badita-Nistor
  0 siblings, 2 replies; 3+ messages in thread
From: Florin Badita-Nistor @ 2026-11-06 17:14 UTC (permalink / raw)
  To: netdev
  Cc: edumazet, ncardwell, kuniyu, davem, kuba, pabeni, horms, shuah,
	linux-kernel, linux-kselftest

Fix false bind() exhaustion when an odd-sized local port range still
contains an eligible free port. The wrap can flip parity in odd-sized
ranges; even-sized scan sequences are unchanged. The namespace-wide
connect() allocator is not changed by this series.

Earlier x86-64 KVM validation of this unchanged allocator/test code:
- Regression test: four failures before, zero after (eight cases).
- Full port-range suite: four failures before, zero after (80 cases);
  two existing SCTP XPASS results unchanged.
- Go net.Listen, 100 attempts per IP version: 100 failures before,
  zero after; explicit free-port controls succeed in both kernels.

Changes in v2:
- Target net-next and drop the stable Cc, as requested by Eric.
- Document parity changes on odd wraps and scope the fix to bind().
- Shorten the cover letter.

v1: https://lore.kernel.org/netdev/CADnh+D0zSzAyYCLo5cXU56o9X-P3RG3N2ix7ARPrP95d8sBXmg@mail.gmail.com/

Florin Badita-Nistor (2):
  tcp: avoid false bind exhaustion with odd-sized port ranges
  selftests/net: cover odd-sized local port ranges with one free port

 net/ipv4/inet_connection_sock.c               |  2 -
 .../selftests/net/ip_local_port_range.c       | 67 ++++++++++++++++++-
 2 files changed, 64 insertions(+), 5 deletions(-)


base-commit: bb67589c87249c9bc2415ab11a754d6e303774e3
-- 
2.51.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-06 17:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-06 17:14 [PATCH net-next v2 0/2] tcp: fix false exhaustion of odd-sized bind port ranges Florin Badita-Nistor
2026-11-06 17:14 ` [PATCH net-next v2 1/2] tcp: avoid false bind exhaustion with odd-sized " Florin Badita-Nistor
2026-11-06 17:14 ` [PATCH net-next v2 2/2] selftests/net: cover odd-sized local port ranges with one free port Florin Badita-Nistor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®