From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C5783446A3 for ; Mon, 4 May 2026 08:43:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777884220; cv=none; b=s4Zw0K6orX0a/49SFMMgkh7mifZZEvzYhfue/0/27IUwgJ6d047wPrRw2eBAWDrRMWlYzEZHv+aEXyytTCHzpn3kfqyZtpfgx1Ae5G5od0aS/nAXecZFGSWOvqdp+HQDukujtKDqNZgca5f/64pN2OXHWHNZwJTX8T+HZbfAnLU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777884220; c=relaxed/simple; bh=0m6J1wz9cyuA4kYE5XzfAuvqPNy6u2DPHTD0FvhaPyU=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=UriZulJZvZAzFxc+mRpyQ5V2bq7elpgerec0eij6uVCm4+WWIOMXbo6bOZUkD6vLZbVYaQv1ErMKxlbTjqG9U6obUqcD9e3VicsWnowjgZVdM7fdBoLHi8b4lRRaky6VlFcmeXw1MsZMyzjAMcGcFzsL952U+LjtK+pt49UiA80= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ttKuR2zI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ttKuR2zI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16151C2BCB8; Mon, 4 May 2026 08:43:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777884220; bh=0m6J1wz9cyuA4kYE5XzfAuvqPNy6u2DPHTD0FvhaPyU=; h=Subject:To:Cc:From:Date:From; b=ttKuR2zIPmiM7gbj8bNKV/NEQYrWtHb3Nqx8waVaagQbpOEFHF4U9t6WYGIx0m03f gf+pYiGzwKuhjU0BmPFCaSFhvJuQ2z9xhndcdyZqJmoFUmOtaZpDK1lakxm8TdcxWv t79JuOyxGYSLrVn5XS8XPXJOamsanM0zQg/mzLoc= Subject: FAILED: patch "[PATCH] mptcp: sync the msk->sndbuf at accept() time" failed to apply to 6.12-stable tree To: yangang@kylinos.cn,matttbe@kernel.org,pabeni@redhat.com Cc: From: Date: Mon, 04 May 2026 10:43:38 +0200 Message-ID: <2026050437-capable-smite-5105@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x fcf04b14334641f4b0b8647824480935e9416d52 # git commit -s git send-email --to '' --in-reply-to '2026050437-capable-smite-5105@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From fcf04b14334641f4b0b8647824480935e9416d52 Mon Sep 17 00:00:00 2001 From: Gang Yan Date: Mon, 20 Apr 2026 18:19:23 +0200 Subject: [PATCH] mptcp: sync the msk->sndbuf at accept() time On passive MPTCP connections, the msk sndbuf is not updated correctly. The root cause is an order issue in the accept path: - tcp_check_req() -> subflow_syn_recv_sock() -> mptcp_sk_clone_init() calls __mptcp_propagate_sndbuf() to copy the ssk sndbuf into msk - Later, tcp_child_process() -> tcp_init_transfer() -> tcp_sndbuf_expand() grows the ssk sndbuf. So __mptcp_propagate_sndbuf() runs before the ssk sndbuf has been expanded and the msk ends up with a much smaller sndbuf than the subflow: MPTCP: msk->sndbuf:20480, msk->first->sndbuf:2626560 Fix this by moving the __mptcp_propagate_sndbuf() call from mptcp_sk_clone_init() -- the ssk sndbuf is not yet finalized there -- to __mptcp_propagate_sndbuf() at accept() time, when the ssk sndbuf has been fully expanded by tcp_sndbuf_expand(). Fixes: 8005184fd1ca ("mptcp: refactor sndbuf auto-tuning") Cc: stable@vger.kernel.org Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/602 Signed-off-by: Gang Yan Acked-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20260420-net-mptcp-sync-sndbuf-accept-v1-1-e3523e3aeb44@kernel.org Signed-off-by: Paolo Abeni diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index fbffd3a43fe8..718e910ff23f 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -3594,7 +3594,6 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk, * uses the correct data */ mptcp_copy_inaddrs(nsk, ssk); - __mptcp_propagate_sndbuf(nsk, ssk); mptcp_rcv_space_init(msk, ssk); msk->rcvq_space.time = mptcp_stamp(); @@ -4252,6 +4251,7 @@ static int mptcp_stream_accept(struct socket *sock, struct socket *newsock, mptcp_graft_subflows(newsk); mptcp_rps_record_subflows(msk); + __mptcp_propagate_sndbuf(newsk, mptcp_subflow_tcp_sock(subflow)); /* Do late cleanup for the first subflow as necessary. Also * deal with bad peers not doing a complete shutdown.