Thread (4 messages) flat view 4 messages, 4 authors, 5d ago

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

From: Matthieu Baerts <matttbe@kernel.org>
Date: 2026-09-18 08:50:28

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) <matttbe@kernel.org>

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help