Netdev List
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] inet: fix established lookup races
@ 2026-10-23  5:24 Hyunwoo Kim
  2026-10-23  5:24 ` [PATCH net v2 1/2] inet: reject unhashed sockets during established lookups Hyunwoo Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Hyunwoo Kim @ 2026-10-23  5:24 UTC (permalink / raw)
  To: edumazet, ncardwell, kuniyu, davem, kuba, pabeni, horms
  Cc: Hyunwoo Kim, martin.lau, john.fastabend, weiwan, sd, jiayuan.chen,
	netdev

Fix two issues in lockless established socket lookups. Reject unhashed
sockets after taking a reference, and restore the acquire/release
ordering around refcount publication and acquisition.

Changes in v2:
- 1/2: split the unhashed checks and __reqsk_free() to reqsk_put()
  conversions from the ordering changes, set the Fixes tag to commit
  079096f103fa ("tcp/dccp: install syn_recv requests into ehash table"),
  mention the TIME_WAIT hashdance and request replacement cases, clarify
  request reference ownership, and drop the full socket race discussion
  (Eric)
- 2/2: new, split out the acquire/release changes, set the Fixes tag to
  commit fb041bb7c0a9 ("locking/refcount: Consolidate implementations of
  refcount_t"), cover sk_clone(), and leave the already ordered TIME_WAIT
  path unchanged (Eric)
- v1: https://lore.kernel.org/r/ath58Egc-oI6p3Jl@v4bel

Hyunwoo Kim (2):
  inet: reject unhashed sockets during established lookups
  inet: restore refcount ordering for established lookups

 net/core/sock.c                 |  3 +--
 net/ipv4/inet_connection_sock.c | 16 ++++++++++------
 net/ipv4/inet_hashtables.c      |  7 ++++---
 net/ipv4/syncookies.c           |  4 +++-
 net/ipv4/tcp_fastopen.c         |  3 +--
 net/ipv4/tcp_input.c            |  4 +++-
 net/ipv6/inet6_hashtables.c     |  6 ++++--
 7 files changed, 26 insertions(+), 17 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-10-27  5:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-23  5:24 [PATCH net v2 0/2] inet: fix established lookup races Hyunwoo Kim
2026-10-23  5:24 ` [PATCH net v2 1/2] inet: reject unhashed sockets during established lookups Hyunwoo Kim
2026-10-23 16:39   ` Eric Dumazet
2026-10-27  5:55   ` netdev-bot+sashiko
2026-10-23  5:24 ` [PATCH net v2 2/2] inet: restore refcount ordering for " Hyunwoo Kim
2026-10-23 16:33   ` Eric Dumazet
2026-10-23 18:07     ` Hyunwoo Kim
2026-10-27  5:55   ` netdev-bot+sashiko
2026-10-23  5:32 ` [PATCH net v2 0/2] inet: fix established lookup races netdev-bot+sinfo

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