From da443a97abdb6d9d2f19788dd193c537eab3e328 Mon Sep 17 00:00:00 2001 From: Paolo Abeni Date: Tue, 16 Jun 2026 14:37:23 -0400 Subject: 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 Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20260602-net-mptcp-misc-fixes-7-1-rc7-v2-1-856831229976@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/mptcp/protocol.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- cgit v1.2.3