diff options
| author | Paolo Abeni <pabeni@redhat.com> | 2026-06-16 14:37:23 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-04 13:38:41 +0200 |
| commit | da443a97abdb6d9d2f19788dd193c537eab3e328 (patch) | |
| tree | 0eb8cd31a038dc0c02f2c9b1f8bfbe44cc95c2ce | |
| parent | d03c8363041befc2515c32d9636067081dc0914f (diff) | |
| download | linux-da443a97abdb6d9d2f19788dd193c537eab3e328.tar.gz linux-da443a97abdb6d9d2f19788dd193c537eab3e328.zip | |
mptcp: fix missing wakeups in edge scenarios
[ Upstream commit 9d8d28738f24b75616d6ca7a27cb4aed88520343 ]
The mptcp_recvmsg() can fill MPTCP socket receive queue via
mptcp_move_skbs(), but currently does not try to wakeup any listener,
because the same process is going to check the receive queue soon.
When multiple threads are reading from the same fd, the above can
cause stall. Add the missing wakeup.
Fixes: 6771bfd9ee24 ("mptcp: update mptcp ack sequence from work queue")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260602-net-mptcp-misc-fixes-7-1-rc7-v2-1-856831229976@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | net/mptcp/protocol.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index b02c4885adbb..a9595eb2b5fe 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1571,6 +1571,14 @@ static bool __mptcp_move_skbs(struct mptcp_sock *msk) if (mptcp_ofo_queue(msk) || moved > 0) { mptcp_check_data_fin((struct sock *)msk); + + /* When multiple threads read from the same socket, the caller + * filling the receive queue does not try to wake up any other + * listener, which can stall it. Flag the data as ready and + * issue the missing wakeup here. + */ + set_bit(MPTCP_DATA_READY, &msk->flags); + ((struct sock *)msk)->sk_data_ready((struct sock *)msk); return true; } return false; |
