Re: [PATCH net v2] mptcp: fix soft lockup in mptcp_recvmsg()

From: Matthieu Baerts

Date: Tue Mar 24 2026 - 07:37:24 EST


Hi Li,

On 24/03/2026 09:51, Li Xiasong wrote:
> syzbot reported a soft lockup in mptcp_recvmsg() [0].
>
> When receiving data with MSG_PEEK | MSG_WAITALL flags, the skb is not
> removed from the sk_receive_queue. This causes sk_wait_data() to always
> find available data and never perform actual waiting, leading to a soft
> lockup.
>
> Fix this by adding a 'last' parameter to track the last peeked skb.
> This allows sk_wait_data() to make informed waiting decisions and prevent
> infinite loops when MSG_PEEK is used.

Thank you for the v2, it looks good to me:

Reviewed-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>

@Netdev maintainers: this patch can be applied in "net" directly.

Cheers,
Matt
--
Sponsored by the NGI0 Core fund.