On Fri, Dec 04, 2026 at 01:26 PM Paul Moses <…@1g4.org> wrote:
> Sorry, I should have been more clear why it's needed. > > 1. Listener selects ca_noswitch → listener owns the only struct_ops map reference. > 2. Link and map fd are closed. > 3. Child inherits icsk_ca_ops = ca_noswitch but takes no reference. > 4. LSM hook switches child to cubic → tcp_cleanup_congestion_control() drops the > listener’s map reference. > 5. Map is freed. > 6. Listener close touches the dangling icsk_ca_ops
That's the bug that [2] fixes. Its commit log has it: "TCP_CONGESTION: puts icsk->icsk_ca_ops, which the child holds no reference on." The put in step 4 happens in inet_csk_clone_lock(), before tcp_ca_openreq_child() runs. Patch 2 writes icsk_ca_initialized and icsk_ca_priv only. It doesn't get or put icsk_ca_ops. Steps 1-6 are the same with and without patch 2. So [2] is needed on its own. Patch 2 still doesn't depend on it. Pls drop the "Backport prereq" note from patch 2 when you resend.