From: Matthieu Baerts <matttbe@kernel.org>
To: markdamirkan@gmail.com, Mat Martineau <martineau@kernel.org>,
mptcp@lists.linux.dev
Cc: Jakub Kicinski <kuba@kernel.org>,
Geliang Tang <geliang@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Simon Horman <horms@kernel.org>,
linux-kernel@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net] mptcp: return sk_wait_data() errors from recvmsg()
Date: Sun, 13 Sep 2026 19:47:08 +0200 [thread overview]
Message-ID: <c5b348cc-bf4c-4015-ab52-d842485a438d@kernel.org> (raw)
In-Reply-To: <20260913-b4-send-mptcp-recv-error-v1-1-4eaa3684a8b8@gmail.com>
Hi Mark,
On 13/09/2026 12:30, Mark Amirkan via B4 Relay wrote:
> From: Mark Amirkan <markdamirkan@gmail.com>
>
> Commit 581302298524 ("mptcp: error out earlier on disconnect") made
> mptcp_recvmsg() stop when sk_wait_data() returns an error. The error is
> stored in err, but the function then jumps to a path which returns
> copied. When no data was copied, recvmsg() therefore returns zero and
> reports a false EOF.
>
> Store the result in copied, which is the value returned by the function.
> This also keeps the usual partial-read result when data was copied before
> the error.
Good catch! Indeed, it looks like it is a typo and "copied" was supposed
to be assigned.
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
@Net maintainers: can you please apply it directly in the net tree? (if
no issues are spot by Clashiko) No need to take a detour via the MPTCP
tree for this fix.
> A recvmsg() blocked in one thread reproduces the issue when another
> thread disconnects the same MPTCP socket with connect(AF_UNSPEC).
> Before this change recvmsg() returns zero; afterwards it returns -EPIPE.
I see that our test suite currently doesn't exercise this error path. By
chance, do you have a reproducer to avoid similar regressions later on?
Ideally, one using Packetdrill, the MPTCP fork in this case [1].
[1] https://github.com/multipath-tcp/packetdrill
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
prev parent reply other threads:[~2026-09-13 17:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 10:30 [PATCH net] mptcp: return sk_wait_data() errors from recvmsg() Mark Amirkan via B4 Relay
2026-09-13 10:30 ` Mark Amirkan
2026-09-13 12:02 ` MPTCP CI
2026-09-13 17:47 ` Matthieu Baerts [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=c5b348cc-bf4c-4015-ab52-d842485a438d@kernel.org \
--to=matttbe@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geliang@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markdamirkan@gmail.com \
--cc=martineau@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 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.