From nobody Sun Dec 22 02:57:47 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 B51D41CC157; Tue, 19 Nov 2024 13:13:18 +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=1732021998; cv=none; b=AAerRXzMRXtJxUiAZFEDSfc6clIR2Vdkza2q2wt1bhnVX+pwg6Re1NMRd0bSQLIpo7ZPmRbTEoqXF/KQXl0h3xaD3DTlxinllyYNRvDF9V0NG0WruHu6qSVPKkKoPQnhmXK3IumzWG8eAKOmTf9orEC7xrdy4cM1+gyv2sxfoO4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732021998; c=relaxed/simple; bh=w6gZoZObJC59Cyd7haK82gdvArNbm7Yv1CGhDrg+BWc=; h=Subject:To:Cc:From:Date:In-Reply-To:Message-ID:MIME-Version: Content-Type; b=K72eeYUPZQXQ/kbHdqidUxR9BE2W1WK5Dm6fYBOZhCDLxRq8dIzRb1Aq8eUg88kLzkVqFEQU5D1gNEwDycvnnCxgmkqCp0Ye7FQ90dVZME6RbtLSf6NJssKacpq7Cq2jnMJaG/YWcx/RxQgYsXz8LJ32EW4pdaYUmlEW+DotxXY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ohkK5Glm; 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="ohkK5Glm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8317AC4CED0; Tue, 19 Nov 2024 13:13:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1732021998; bh=w6gZoZObJC59Cyd7haK82gdvArNbm7Yv1CGhDrg+BWc=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=ohkK5GlmfhuRcf72Uy5aQtx0GUWFSYSjv4FSj+QoKCNYSHK2BSC2bs657WxB01Gui V7ogNqoFYnPpNrvGcL+5XLCiT+kPOIzqAwxOBttVgUm5cpsvqaHIQGm8Hb4eMIYVN5 S1eYmSkDwl62AYt+kBP2qu3QaO+G5JQTe5Z0o1/0= Subject: Patch "mptcp: update local address flags when setting it" has been added to the 6.1-stable tree To: gregkh@linuxfoundation.org,kuba@kernel.org,matttbe@kernel.org,mptcp@lists.linux.dev,sashal@kernel.org,tanggeliang@kylinos.cn Cc: From: Date: Tue, 19 Nov 2024 14:12:47 +0100 In-Reply-To: <20241119083547.3234013-13-matttbe@kernel.org> Message-ID: <2024111947-cut-premises-8d35@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: update local address flags when setting it to the 6.1-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-update-local-address-flags-when-setting-it.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. From stable+bounces-93939-greg=3Dkroah.com@vger.kernel.org Tue Nov 19 09:36= :47 2024 From: "Matthieu Baerts (NGI0)" Date: Tue, 19 Nov 2024 09:35:52 +0100 Subject: mptcp: update local address flags when setting it To: mptcp@lists.linux.dev, stable@vger.kernel.org, gregkh@linuxfoundation.o= rg Cc: Geliang Tang , sashal@kernel.org, Matthieu Baer= ts , Jakub Kicinski Message-ID: <20241119083547.3234013-13-matttbe@kernel.org> From: Geliang Tang commit e0266319413d5d687ba7b6df7ca99e4b9724a4f2 upstream. Just like in-kernel pm, when userspace pm does set_flags, it needs to send out MP_PRIO signal, and also modify the flags of the corresponding address entry in the local address list. This patch implements the missing logic. Traverse all address entries on userspace_pm_local_addr_list to find the local address entry, if bkup is true, set the flags of this entry with FLAG_BACKUP, otherwise, clear FLAG_BACKUP. Fixes: 892f396c8e68 ("mptcp: netlink: issue MP_PRIO signals from userspace = PMs") Cc: stable@vger.kernel.org Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20241112-net-mptcp-misc-6-12-pm-v1-1-b835580= cefa8@kernel.org Signed-off-by: Jakub Kicinski [ Conflicts in pm_userspace.c, because commit 6a42477fe449 ("mptcp: update set_flags interfaces"), is not in this version, and causes too many conflicts when backporting it. The same code can still be added at the same place, before sending the ACK. ] Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Greg Kroah-Hartman --- net/mptcp/pm_userspace.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/net/mptcp/pm_userspace.c +++ b/net/mptcp/pm_userspace.c @@ -565,6 +565,7 @@ int mptcp_userspace_pm_set_flags(struct struct mptcp_pm_addr_entry *loc, struct mptcp_pm_addr_entry *rem, u8 bkup) { + struct mptcp_pm_addr_entry *entry; struct mptcp_sock *msk; int ret =3D -EINVAL; struct sock *sk; @@ -585,6 +586,17 @@ int mptcp_userspace_pm_set_flags(struct rem->addr.family =3D=3D AF_UNSPEC) goto set_flags_err; =20 + spin_lock_bh(&msk->pm.lock); + list_for_each_entry(entry, &msk->pm.userspace_pm_local_addr_list, list) { + if (mptcp_addresses_equal(&entry->addr, &loc->addr, false)) { + if (bkup) + entry->flags |=3D MPTCP_PM_ADDR_FLAG_BACKUP; + else + entry->flags &=3D ~MPTCP_PM_ADDR_FLAG_BACKUP; + } + } + spin_unlock_bh(&msk->pm.lock); + lock_sock(sk); ret =3D mptcp_pm_nl_mp_prio_send_ack(msk, &loc->addr, &rem->addr, bkup); release_sock(sk); Patches currently in stable-queue which might be from matttbe@kernel.org are queue-6.1/mptcp-pm-use-_rcu-variant-under-rcu_read_lock.patch queue-6.1/mptcp-error-out-earlier-on-disconnect.patch queue-6.1/mptcp-hold-pm-lock-when-deleting-entry.patch queue-6.1/mptcp-cope-racing-subflow-creation-in-mptcp_rcv_space_adjust.patch queue-6.1/mptcp-drop-lookup_by_id-in-lookup_addr.patch queue-6.1/mptcp-add-userspace_pm_lookup_addr_by_id-helper.patch queue-6.1/mptcp-define-more-local-variables-sk.patch queue-6.1/mptcp-update-local-address-flags-when-setting-it.patch