From: sashiko-bot@kernel.org
To: "Geliang Tang" <geliang@kernel.org>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-net v4 2/4] mptcp: use SOCK_DONE in mptcp_inq_hint
Date: Sat, 28 Nov 2026 11:20:22 +0000 [thread overview]
Message-ID: <sashiko-outbox-238656@kernel.org> (raw)
In-Reply-To: <a9eb2043cc9dec009979c30c940f940f2cba2953.1795863454.git.tanggeliang@kylinos.cn>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mptcp: inaccurate SOCK_DONE setters and behavior description in
commit message
--
commit 29686dc34959b6d287ae3e6764bcdbaa2489bcad
Author: Geliang Tang <geliang@kernel.org>
mptcp: use SOCK_DONE in mptcp_inq_hint
This commit switches mptcp_inq_hint() from checking TCP_CLOSE and
RCV_SHUTDOWN to checking SOCK_DONE when the receive queue is empty.
> mptcp_inq_hint() checks sk_state == TCP_CLOSE and RCV_SHUTDOWN to
> decide whether to return a non-zero hint when the receive queue is
> empty. This is redundant: SOCK_DONE is the canonical indicator that
> no more data will arrive, and it is set in all the relevant paths -
> __mptcp_data_fin_incoming(), __mptcp_subflow_error_report(), and
> __mptcp_close().
[Severity: Low]
Is the commit message accurate about where SOCK_DONE is set and how this
changes mptcp_inq_hint()?
There is no __mptcp_data_fin_incoming() function; incoming DATA_FIN (or
fallback TCP FIN) sets SOCK_DONE in mptcp_check_data_fin(). Also,
__mptcp_close() sets sk->sk_shutdown to SHUTDOWN_MASK and orphans the
socket, but does not set SOCK_DONE.
Because SOCK_DONE is only set when a peer DATA_FIN or fallback FIN is
received, this is not just removing a redundant check: on an empty receive
queue after a local shutdown(SHUT_RD), on a closed or unconnected socket,
or after an abortive MP_FASTCLOSE or fallback reset without a prior FIN,
mptcp_inq_hint() now returns 0 instead of 1 (matching tcp_inq_hint()).
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1795863454.git.tanggeliang@kylinos.cn?part=2
next prev parent reply other threads:[~2026-11-28 11:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 11:08 [PATCH mptcp-net v4 0/4] mptcp: fixes for SIOCINQ Geliang Tang
2026-11-28 11:08 ` [PATCH mptcp-net v4 1/4] mptcp: add missing memory barriers for rcv_data_fin_seq Geliang Tang
2026-11-28 11:08 ` [PATCH mptcp-net v4 2/4] mptcp: use SOCK_DONE in mptcp_inq_hint Geliang Tang
2026-11-28 11:20 ` sashiko-bot [this message]
2026-11-28 11:08 ` [PATCH mptcp-net v4 3/4] mptcp: fix TFO SIOCINQ overflow " Geliang Tang
2026-11-28 11:25 ` sashiko-bot
2026-11-28 11:08 ` [PATCH mptcp-net v4 4/4] mptcp: add mptcp_inq() for SIOCINQ Geliang Tang
2026-11-28 12:13 ` [PATCH mptcp-net v4 0/4] mptcp: fixes " MPTCP CI
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=sashiko-outbox-238656@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=geliang@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=sashiko-reviews@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox