Re: [PATCH v1 net-next] tcp: Set unhashed_state in inet_twsk_hashdance_schedule().

Matthieu Baerts <[email protected]>
Newsgroups org.kernel.vger.netdev
Organization NGI0 Core
Message-ID <[email protected]>
Hi Kuniyuki,

On 17/09/2026 21:15, Kuniyuki Iwashima wrote:
> inet_unhash() sets inet_csk(sk)->unhashed_state only when the
> socket is hashed because tcp_set_state(sk, TCP_CLOSE) could be
> called multiple times, e.g. tcp_abort() calls it directly and
> tcp_done_with_error().
> 
> However, inet_twsk_hashdance_schedule() also unhashes a socket
> when replacing it with twsk, allowing the socket to bypass
> checks for inet_csk(sk)->unhashed_state.
> 
> Let's update inet_csk(sk)->unhashed_state there as well.
Thank you for the fix!

Reviewed-by: Matthieu Baerts (NGI0) <[email protected]>

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.