From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Paul Moses" <p@1g4.org>
Cc: <bpf@vger.kernel.org>, <netdev@vger.kernel.org>,
<daniel@iogearbox.net>, <martin.lau@linux.dev>,
<edumazet@kernel.org>, <ncardwell@google.com>,
<kuniyu@google.com>, <jiayuan.chen@linux.dev>
Subject: Re: [PATCH bpf v2 0/3] tcp, bpf: fix CA state on open and the TCP_CONGESTION name check
Date: Sat, 05 Dec 2026 01:36:09 +0000 [thread overview]
Message-ID: <DNCEWOBJTPJF.3VGK5DRAMAV1N@gmail.com> (raw)
In-Reply-To: <0qI4bliEJoe1Gzuxoccq94xz28S015yDsjw2nfkjEAyABbd6OQ3d8MEGJ5WX6zuDQhbfOH2IxT36YERbqvYrlYwHeaRGXNsWeurXQahMGH0=@1g4.org>
On Fri, Dec 04, 2026 at 01:26 PM Paul Moses <p@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.
prev parent reply other threads:[~2026-12-05 1:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 9:01 [PATCH bpf v2 0/3] tcp, bpf: fix CA state on open and the TCP_CONGESTION name check Paul Moses
2026-12-04 9:01 ` [PATCH bpf v2 1/3] tcp: reset congestion-control state when the route selects a new CA Paul Moses
2026-12-04 9:01 ` [PATCH bpf v2 2/3] tcp: clear inherited congestion-control state for a cloned child Paul Moses
2026-12-04 9:01 ` [PATCH bpf v2 3/3] bpf: check and set TCP congestion control from the same name Paul Moses
2026-12-04 21:04 ` [PATCH bpf v2 0/3] tcp, bpf: fix CA state on open and the TCP_CONGESTION name check Alexei Starovoitov
2026-12-04 21:26 ` Paul Moses
2026-12-05 1:36 ` Alexei Starovoitov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DNCEWOBJTPJF.3VGK5DRAMAV1N@gmail.com \
--to=alexei.starovoitov@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=edumazet@kernel.org \
--cc=jiayuan.chen@linux.dev \
--cc=kuniyu@google.com \
--cc=martin.lau@linux.dev \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=p@1g4.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox