Netdev List
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: netdev-bot+sashiko@kernel.org
Cc: martineau@kernel.org, geliang@kernel.org, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	willemb@google.com, horms@kernel.org, dcaratti@redhat.com,
	netdev@vger.kernel.org, mptcp@lists.linux.dev, mason@kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH net 2/9] mptcp: keep an orphan while it can send its data
Date: Fri, 4 Dec 2026 13:04:24 +0100	[thread overview]
Message-ID: <45598bd4-f7b7-46ff-a937-6996cb6ae8b9@kernel.org> (raw)
In-Reply-To: <179633470902.3146.5343522154219240904@kernel.org>

Hello,

On 03/12/2026 22:51, netdev-bot+sashiko@kernel.org wrote:

(...)

> [Severity: High]
> Does this cover connections that fell back to plain TCP? 

(...)

> Should the keep check also account for data queued in the subflows on
> fallback, or should fallback orphans be left to TCP's orphan handling?

The latter. This is a separate issue, since v6.1, so a different patch:
after a fallback, these orphans were already reset before this patch. It
is fixed by a patch already in the MPTCP tree, but with the "please send
smaller series" request, I couldn't add it here:


https://lore.kernel.org/20261124-mptcp-cmason-fixes-v3-5-416c0920c73f@kernel.org

>> +
>> +	mptcp_for_each_subflow(msk, subflow) {
>> +		struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
>> +
>> +		/* a live peer acks at least the probes, every TCP_RTO_MAX */
>> +		if (__mptcp_subflow_active(subflow) &&
>> +		    tcp_jiffies32 - READ_ONCE(tcp_sk(ssk)->rcv_tstamp) <
>> +		    2 * TCP_RTO_MAX)
>> +			return true;
> 
> [Severity: Low]
> Can this unsigned subtraction underflow?

(...)

> Would taking a single tcp_jiffies32 snapshot and using a signed
> comparison avoid this? mptcp_close_tout_expired() just above already
> uses time_after32().

Yes, as in tcp_rtx_probe0_timed_out(). In this rare case, the orphan is
reset, as before this patch: this can be improved in net-next.

> [Severity: Medium]
> With only this patch applied, what limits how long an orphan can be
> kept?

(...)

> Since this patch has Cc: stable, could it be backported without those
> follow-ups?

No: the next two patches have the same Fixes tag, and the next one has a
note for the backports about that.

> [Severity: Low]
> Can this restart overwrite a close timeout that was backdated on
> purpose? 

(...)

> Would the orphan then stay around for another TCP_TIMEWAIT_LEN with no
> usable subflow, instead of being destroyed in this worker run as it
> was before?

Yes, in this rare case, the orphan is freed one close timeout later.
This can be improved in net-next too.

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  reply	other threads:[~2026-12-04 12:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 21:29 [PATCH net 0/9] mptcp: misc fixes for v7.4-rc7 Matthieu Baerts (NGI0)
2026-12-02 21:29 ` [PATCH net 1/9] mptcp: pm: kernel: c-flag: keep local_addr_used in sync Matthieu Baerts (NGI0)
2026-12-02 21:29 ` [PATCH net 2/9] mptcp: keep an orphan while it can send its data Matthieu Baerts (NGI0)
2026-12-03 21:51   ` netdev-bot+sashiko
2026-12-04 12:04     ` Matthieu Baerts [this message]
2026-12-02 21:29 ` [PATCH net 3/9] mptcp: limit an orphan probing a zero window Matthieu Baerts (NGI0)
2026-12-03 21:51   ` netdev-bot+sashiko
2026-12-04 12:04     ` Matthieu Baerts
2026-12-02 21:29 ` [PATCH net 4/9] mptcp: count orphans as TCP does Matthieu Baerts (NGI0)
2026-12-03 21:51   ` netdev-bot+sashiko
2026-12-04 12:04     ` Matthieu Baerts
2026-12-02 21:29 ` [PATCH net 5/9] mptcp: return EOF after a DATA_FIN, " Matthieu Baerts (NGI0)
2026-12-03 21:51   ` netdev-bot+sashiko
2026-12-04 12:04     ` Matthieu Baerts
2026-12-02 21:29 ` [PATCH net 6/9] mptcp: wake up blocked senders when no sf left Matthieu Baerts (NGI0)
2026-12-03 21:51   ` netdev-bot+sashiko
2026-12-04 12:05     ` Matthieu Baerts
2026-12-02 21:29 ` [PATCH net 7/9] mptcp: reclaim forward memory after coalescing skbs Matthieu Baerts (NGI0)
2026-12-03 21:51   ` netdev-bot+sashiko
2026-12-04 12:05     ` Matthieu Baerts
2026-12-02 21:29 ` [PATCH net 8/9] mptcp: don't charge a shared page twice at accept() Matthieu Baerts (NGI0)
2026-12-02 21:29 ` [PATCH net 9/9] mptcp: don't charge the backlog " Matthieu Baerts (NGI0)
2026-12-04 12:05 ` [PATCH net 0/9] mptcp: misc fixes for v7.4-rc7 Matthieu Baerts

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=45598bd4-f7b7-46ff-a937-6996cb6ae8b9@kernel.org \
    --to=matttbe@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=edumazet@kernel.org \
    --cc=geliang@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=martineau@kernel.org \
    --cc=mason@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=willemb@google.com \
    /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