From: Paolo Abeni Date: Sun, 2 Nov 2025 20:14:45 +0000 (-0500) Subject: mptcp: leverage skb deferral free X-Git-Tag: v6.17.8~740 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1943b49e9f0464f554d753a20691e83e60030a94;p=thirdparty%2Fkernel%2Fstable.git mptcp: leverage skb deferral free [ Upstream commit 9aa59323f2709370cb4f01acbba599a9167f317b ] Usage of the skb deferral API is straight-forward; with multiple subflows actives this allow moving part of the received application load into multiple CPUs. Also fix a typo in the related comment. Reviewed-by: Geliang Tang Tested-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20250927-net-next-mptcp-rcv-path-imp-v1-1-5da266aa9c1a@kernel.org Signed-off-by: Jakub Kicinski Stable-dep-of: 8e04ce45a8db ("mptcp: fix MSG_PEEK stream corruption") Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index a25dcdf748ca7..e4398ee9b55ac 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1934,12 +1934,13 @@ static int __mptcp_recvmsg_mskq(struct sock *sk, } if (!(flags & MSG_PEEK)) { - /* avoid the indirect call, we know the destructor is sock_wfree */ + /* avoid the indirect call, we know the destructor is sock_rfree */ skb->destructor = NULL; + skb->sk = NULL; atomic_sub(skb->truesize, &sk->sk_rmem_alloc); sk_mem_uncharge(sk, skb->truesize); __skb_unlink(skb, &sk->sk_receive_queue); - __kfree_skb(skb); + skb_attempt_defer_free(skb); msk->bytes_consumed += count; }