Re: [PATCH 5.15.y] tcp: clear sock_ops cb flags before force-closing a child socket

From: Sasha Levin

Date: Wed Sep 09 2026 - 16:27:15 EST


> A child socket inherits the listener's bpf_sock_ops_cb_flags via
> sk_clone_lock(). If its setup fails in tcp_v4_syn_recv_sock() /
> tcp_v6_syn_recv_sock(), the child is freed through put_and_exit, where
> inet_csk_prepare_forced_close() drops the socket lock and tcp_done() runs
> without it.

Queued for 6.6, 6.1 and 5.15, thanks. The 5.15.y version applied cleanly to 6.6 and 6.1 as well, so it was used for both.

--
Thanks,
Sasha