From: sashiko-bot@kernel.org
To: "Geliang Tang" <geliang@kernel.org>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v10] mptcp: count the DATA_FIN in mptcp_inq_hint
Date: Sun, 06 Dec 2026 04:56:14 +0000 [thread overview]
Message-ID: <sashiko-outbox-252150@kernel.org> (raw)
In-Reply-To: <41d066cd5e7a602c2e909acd83c43672f213795e.1796531907.git.tanggeliang@kylinos.cn>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mptcp: mptcp_splice_read() misses mptcp_pending_eof() check
--
commit 682dbfa2512e69f321d0fd1137d83a62ffdf44a7
Author: Geliang Tang <geliang@kernel.org>
mptcp: count the DATA_FIN in mptcp_inq_hint
This commit counts a pending DATA_FIN in mptcp_inq_hint() using a new
mptcp_pending_eof() helper and adds mptcp_pending_eof() as an exit
condition in mptcp_recvmsg().
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 14fca55d46199..7527d17572606 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
[ ... ]
> @@ -2544,6 +2549,10 @@ static int mptcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
> if (!list_empty(&msk->backlog_list) && mptcp_move_skbs(sk))
> continue;
>
> + /* A pending EOF acts like a FIN at the queue tail. */
> + if (mptcp_pending_eof(sk, NULL))
> + break;
> +
> /* only the MPTCP socket status is relevant here. The exit
> * conditions mirror closely tcp_recvmsg()
> */
[Severity: Low]
Does mptcp_splice_read() need the same mptcp_pending_eof() check?
When data and an in-sequence DATA_FIN arrive while the socket is not
owned by userspace, mptcp_check_data_fin() is deferred to mptcp_worker()
with backlog_list empty. After recvmsg() drains the queue and reports
TCP_CM_INQ = 1, SOCK_DONE and RCV_SHUTDOWN remain unset.
If userspace then calls non-blocking splice() before mptcp_worker()
runs, mptcp_recv_skb() skips mptcp_move_skbs() because backlog_list is
empty, and mptcp_splice_read() only checks SOCK_DONE and RCV_SHUTDOWN,
so it returns -EAGAIN instead of 0.
--
Sashiko AI review · https://sashiko.dev/#/patchset/41d066cd5e7a602c2e909acd83c43672f213795e.1796531907.git.tanggeliang@kylinos.cn?part=1
prev parent reply other threads:[~2026-12-06 4:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-06 4:42 [PATCH mptcp-next v10] mptcp: count the DATA_FIN in mptcp_inq_hint Geliang Tang
2026-12-06 4:56 ` sashiko-bot [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=sashiko-outbox-252150@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 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.