From: netdev-bot+sashiko@kernel.org
To: geliang@kernel.org
Cc: mptcp@lists.linux.dev, kuba@kernel.org
Subject: Re: [PATCH mptcp-net v29 1/8] mptcp: clear rcv_data_fin_seq in mptcp_disconnect
Date: Fri, 20 Nov 2026 18:41:48 +0000 [thread overview]
Message-ID: <179520010810.3133.1816117827174569907@kernel.org> (raw)
In-Reply-To: <8ddc0c84953b684795e5059639b88594c30a3470.1795063943.git.tanggeliang@kylinos.cn>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message describes a failure that cannot happen.
- [Low] The From and Signed-off-by addresses don't match.
--
mptcp: clear rcv_data_fin_seq in mptcp_disconnect
This commit resets msk->rcv_data_fin_seq to 0 in mptcp_disconnect(), right
after the existing rcv_data_fin reset. A disconnected and reused socket then
no longer keeps the DATA_FIN sequence from its previous connection.
> This can cause mptcp_pending_data_fin() to incorrectly match the old
> rcv_data_fin_seq against the new connection's ack_seq, triggering a
> spurious DATA_FIN processing.
[Severity: Low]
Can this sequence actually happen?
In mptcp_pending_data_fin() in net/mptcp/protocol.c, rcv_data_fin_seq is
only read after the rcv_data_fin check passes:
if (READ_ONCE(msk->rcv_data_fin) &&
((1 << inet_sk_state_load(sk)) &
(TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_FIN_WAIT2))) {
u64 rcv_data_fin_seq = READ_ONCE(msk->rcv_data_fin_seq);
mptcp_disconnect() already clears rcv_data_fin. The only place that sets it
again is mptcp_update_rcv_data_fin() in net/mptcp/options.c. That function
writes a fresh rcv_data_fin_seq just before it sets the flag:
WRITE_ONCE(msk->rcv_data_fin_seq,
mptcp_expand_seq(READ_ONCE(msk->ack_seq), data_fin_seq, use_64bit));
WRITE_ONCE(msk->rcv_data_fin, 1);
Every caller goes through this helper: mptcp_incoming_options(),
get_mapping_status() (twice) and subflow_sched_work_if_closed(). So the
stale value seems to be overwritten every time before
mptcp_pending_data_fin() can read it.
The reset still looks necessary, but because of the next patch in the
series, "mptcp: fix TFO SIOCINQ overflow in mptcp_inq_hint". That patch adds
a reader in mptcp_inq_hint() that does not check rcv_data_fin first:
if (READ_ONCE(msk->rcv_data_fin_seq))
hint_val += 1;
Without this reset, that check would count a FIN byte after disconnect and
reuse, even though no DATA_FIN was received.
Could the commit message give that dependency as the reason instead? As
written, the Fixes: b29fcfb54cd7 tag points to a mptcp_pending_data_fin()
problem that doesn't seem to exist. That could give stable maintainers the
wrong reason and the wrong backport range.
> Fixes: b29fcfb54cd7 ("mptcp: full disconnect implementation")
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
[Severity: Low]
This isn't a bug, but the From and Signed-off-by addresses don't match. The
author is Geliang Tang <geliang@kernel.org>, while the only sign-off uses
tanggeliang@kylinos.cn. Because of this, checkpatch.pl warns with
FROM_SIGN_OFF_MISMATCH.
Other patches in the same series sign off with the kernel.org address.
Could the author be changed to the kylinos.cn address, or a Signed-off-by
with the kernel.org address be added?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1795063943.git.tanggeliang%40kylinos.cn
next prev parent reply other threads:[~2026-11-20 18:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 5:10 [PATCH mptcp-next v29 0/8] Reduce the differences between TCP and MPTCP for TLS usage Geliang Tang
2026-11-19 5:10 ` [PATCH mptcp-net v29 1/8] mptcp: clear rcv_data_fin_seq in mptcp_disconnect Geliang Tang
2026-11-20 18:41 ` netdev-bot+sashiko [this message]
2026-11-19 5:10 ` [PATCH mptcp-net v29 2/8] mptcp: fix TFO SIOCINQ overflow in mptcp_inq_hint Geliang Tang
2026-11-19 5:26 ` sashiko-bot
2026-11-20 18:41 ` netdev-bot+sashiko
2026-11-19 5:10 ` [PATCH mptcp-next v29 3/8] mptcp: drop the mptcp_ooo_try_coalesce() helper Geliang Tang
2026-11-19 5:10 ` [PATCH mptcp-next v29 4/8] mptcp: drop the cant_coalesce CB field Geliang Tang
2026-11-20 18:41 ` netdev-bot+sashiko
2026-11-19 5:10 ` [PATCH mptcp-next v29 5/8] mptcp: encapsulate CB DSN field access with helpers Geliang Tang
2026-11-20 18:41 ` netdev-bot+sashiko
2026-11-19 5:10 ` [PATCH mptcp-next v29 6/8] mptcp: remove CB offset field Geliang Tang
2026-11-20 18:41 ` netdev-bot+sashiko
2026-11-19 5:10 ` [PATCH mptcp-next v29 7/8] mptcp: sync mptcp skb cb layout with tcp one Geliang Tang
2026-11-19 5:43 ` sashiko-bot
2026-11-20 18:41 ` netdev-bot+sashiko
2026-11-19 5:10 ` [PATCH mptcp-next v29 8/8] mptcp: defer read_sock cleanup to mptcp_worker Geliang Tang
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=179520010810.3133.1816117827174569907@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=geliang@kernel.org \
--cc=kuba@kernel.org \
--cc=mptcp@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.