Re: [PATCH net] net: reuseport: avoid duplicate closed socket insertion
From: Jiayuan Chen
Date: Sat Nov 07 2026 - 00:02:47 EST
On 11/6/26 9:58 PM, Lin Jiapeng wrote:
> Clearing SO_REUSEPORT on a TCP listener clears sk_reuseport but leaves
> sk_reuseport_cb attached to its reuseport group. A subsequent listen()
> does not put the socket back into the listening section because
> inet_hash() checks sk_reuseport. However, inet_unhash() checks
> sk_reuseport_cb and calls reuseport_stop_listen_sock().
>
> With request migration enabled, reuseport_stop_listen_sock() ignores
> whether __reuseport_detach_sock() actually removed the socket from the
> listening section and unconditionally appends it to the closed section.
> Repeated connect(AF_UNSPEC)/listen() cycles therefore insert the same
> socket until num_closed_socks exceeds max_socks. The next insertion
> writes before socks[], overlapping prog on x86-64 and leading to type
> confusion when a reuseport program is attached or detached.
Is the issue same as Eric's patch ?
https://lore.kernel.org/netdev/20261106084300.2029567-1-edumazet@xxxxxxxxxx/