From nobody Sun May 19 20:29:56 2024 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 A4A06171C7; Mon, 4 Mar 2024 08:26:34 +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=1709540794; cv=none; b=RCUG0+xFLSQe/PYz5HA3L6KfNUr8GIdRUDOPyyWQCTSJikCxxHm4/THqEuxxKg+QZQDrru4HNHrP2YRzCVi/t/8Aj3ApzVoj60adqyY6PisPLndAtc39znZ0/Yg2YOdjRiLJ0lEknfRQpjfslgVumVoUiPjQT9Kn2m3hBAWSyik= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709540794; c=relaxed/simple; bh=x0nQG9IHKuCgjoMW7NWi49JHdGZN22mee2Y9K/ukqQI=; h=Subject:To:Cc:From:Date:In-Reply-To:Message-ID:MIME-Version: Content-Type; b=PmCslAxMO3cUzOwUAos2vWAaMxYMqHStq1xstkY4OO2lncivhEltkXOWPoOiGi/1jIBlN81VePRCbpcMSgRxmO1a7R8NAuKSPupJ65Jr64OTGQ2xMGSykec9HLBbeiwxE1iU1jBi+6h6xpELoi+OIPcNL7oUPyw0zBCxVEYsHfI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vP8Fnzob; 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="vP8Fnzob" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D15B0C433C7; Mon, 4 Mar 2024 08:26:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709540794; bh=x0nQG9IHKuCgjoMW7NWi49JHdGZN22mee2Y9K/ukqQI=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=vP8FnzobR67YuMV/lSIz/vH0tPiqu/Bmep5ASXTnLf88l8hNfA7x43clgK6k/ICqs p3Xj1vyrJLVbQpMnZakANUGW3uCiehEQklE9ehuUl3b+K6xAKNS8Rwnm7EhS8UWH3o NTwIbleOewbcrbDP9hs7lkz3SKGq0YQuRXrIM26s= Subject: Patch "mptcp: move __mptcp_error_report in protocol.c" has been added to the 5.15-stable tree To: davem@davemloft.net,gregkh@linuxfoundation.org,martineau@kernel.org,matthieu.baerts@tessares.net,matttbe@kernel.org,mptcp@lists.linux.dev,pabeni@redhat.com Cc: From: Date: Mon, 04 Mar 2024 09:26:09 +0100 In-Reply-To: <20240228173157.255719-2-matttbe@kernel.org> Message-ID: <2024030409-humility-defame-eb4e@gregkh> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-stable: commit X-Patchwork-Hint: ignore Content-Type: text/plain; charset="utf-8" This is a note to let you know that I've just added the patch titled mptcp: move __mptcp_error_report in protocol.c to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=3Dlinux/kernel/git/stable/stable-queue.git= ;a=3Dsummary The filename of the patch is: mptcp-move-__mptcp_error_report-in-protocol.c.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. From stable+bounces-25402-greg=3Dkroah.com@vger.kernel.org Wed Feb 28 18:32= :33 2024 From: "Matthieu Baerts (NGI0)" Date: Wed, 28 Feb 2024 18:31:58 +0100 Subject: mptcp: move __mptcp_error_report in protocol.c To: stable@vger.kernel.org, gregkh@linuxfoundation.org Cc: MPTCP Upstream , Paolo Abeni = , Mat Martineau , Matthieu Baerts , "David S . Miller" , Matthieu Baerts Message-ID: <20240228173157.255719-2-matttbe@kernel.org> From: Paolo Abeni commit d5fbeff1ab812b6c473b6924bee8748469462e2c upstream. This will simplify the next patch ("mptcp: process pending subflow error on close"). No functional change intended. Cc: stable@vger.kernel.org # v5.12+ Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Greg Kroah-Hartman --- net/mptcp/protocol.c | 36 ++++++++++++++++++++++++++++++++++++ net/mptcp/subflow.c | 36 ------------------------------------ 2 files changed, 36 insertions(+), 36 deletions(-) --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -688,6 +688,42 @@ static bool __mptcp_ofo_queue(struct mpt return moved; } =20 +void __mptcp_error_report(struct sock *sk) +{ + struct mptcp_subflow_context *subflow; + struct mptcp_sock *msk =3D mptcp_sk(sk); + + mptcp_for_each_subflow(msk, subflow) { + struct sock *ssk =3D mptcp_subflow_tcp_sock(subflow); + int err =3D sock_error(ssk); + int ssk_state; + + if (!err) + continue; + + /* only propagate errors on fallen-back sockets or + * on MPC connect + */ + if (sk->sk_state !=3D TCP_SYN_SENT && !__mptcp_check_fallback(msk)) + continue; + + /* We need to propagate only transition to CLOSE state. + * Orphaned socket will see such state change via + * subflow_sched_work_if_closed() and that path will properly + * destroy the msk as needed. + */ + ssk_state =3D inet_sk_state_load(ssk); + if (ssk_state =3D=3D TCP_CLOSE && !sock_flag(sk, SOCK_DEAD)) + inet_sk_state_store(sk, ssk_state); + WRITE_ONCE(sk->sk_err, -err); + + /* This barrier is coupled with smp_rmb() in mptcp_poll() */ + smp_wmb(); + sk_error_report(sk); + break; + } +} + /* In most cases we will be able to lock the mptcp socket. If its already * owned, we need to defer to the work queue to avoid ABBA deadlock. */ --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -1269,42 +1269,6 @@ void mptcp_space(const struct sock *ssk, *full_space =3D tcp_full_space(sk); } =20 -void __mptcp_error_report(struct sock *sk) -{ - struct mptcp_subflow_context *subflow; - struct mptcp_sock *msk =3D mptcp_sk(sk); - - mptcp_for_each_subflow(msk, subflow) { - struct sock *ssk =3D mptcp_subflow_tcp_sock(subflow); - int err =3D sock_error(ssk); - int ssk_state; - - if (!err) - continue; - - /* only propagate errors on fallen-back sockets or - * on MPC connect - */ - if (sk->sk_state !=3D TCP_SYN_SENT && !__mptcp_check_fallback(msk)) - continue; - - /* We need to propagate only transition to CLOSE state. - * Orphaned socket will see such state change via - * subflow_sched_work_if_closed() and that path will properly - * destroy the msk as needed. - */ - ssk_state =3D inet_sk_state_load(ssk); - if (ssk_state =3D=3D TCP_CLOSE && !sock_flag(sk, SOCK_DEAD)) - inet_sk_state_store(sk, ssk_state); - sk->sk_err =3D -err; - - /* This barrier is coupled with smp_rmb() in mptcp_poll() */ - smp_wmb(); - sk_error_report(sk); - break; - } -} - static void subflow_error_report(struct sock *ssk) { struct sock *sk =3D mptcp_subflow_ctx(ssk)->conn; Patches currently in stable-queue which might be from kroah.com@vger.kernel= .org are queue-5.15/selftests-mptcp-add-missing-kconfig-for-nf-filter.patch queue-5.15/selftests-mptcp-add-missing-kconfig-for-nf-filter-in-v6.patch queue-5.15/mptcp-add-needs_id-for-netlink-appending-addr.patch queue-5.15/mptcp-rename-timer-related-helper-to-less-confusing-names.patch queue-5.15/mptcp-process-pending-subflow-error-on-close.patch queue-5.15/mptcp-clean-up-harmless-false-expressions.patch queue-5.15/mptcp-move-__mptcp_error_report-in-protocol.c.patch