]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mptcp: fix missing wakeups in edge scenarios
authorPaolo Abeni <pabeni@redhat.com>
Tue, 16 Jun 2026 03:59:17 +0000 (23:59 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Jun 2026 11:42:38 +0000 (13:42 +0200)
[ 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>
net/mptcp/protocol.c

index c4499eb1ca2b9d33637e4ff7664c873b55c7af43..a6410a50f0e3be336e6143a1141214e6a6a55744 100644 (file)
@@ -2242,7 +2242,11 @@ static bool __mptcp_move_skbs(struct mptcp_sock *msk)
        }
        if (ret)
                mptcp_check_data_fin((struct sock *)msk);
-       return !skb_queue_empty(&msk->receive_queue);
+
+       ret = !skb_queue_empty(&msk->receive_queue);
+       if (ret && mptcp_epollin_ready(sk))
+               sk->sk_data_ready(sk);
+       return ret;
 }
 
 static unsigned int mptcp_inq_hint(const struct sock *sk)