FAILED: patch "[PATCH] mptcp: pm: send ACK on an active subflow" failed to apply to 5.15-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.15-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 <[email protected]>.
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-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x c07cc3ed895f9bfe0c53b5ed6be710c133b4271c
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024083031-diffuser-strongbox-b85f@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
c07cc3ed895f ("mptcp: pm: send ACK on an active subflow")f5360e9b314c ("mptcp: introduce and use mptcp_pm_send_ack()") 892f396c8e68 ("mptcp: netlink: issue MP_PRIO signals from userspace PMs") a657430260e5 ("mptcp: Acquire the subflow socket lock before modifying MP_PRIO flags") c21b50d5912b ("mptcp: Avoid acquiring PM lock for subflow priority changes") 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment") d9a4594edabf ("mptcp: netlink: Add MPTCP_PM_CMD_REMOVE")9ab4807c84a4 ("mptcp: netlink: Add MPTCP_PM_CMD_ANNOUNCE")982f17ba1a25 ("mptcp: netlink: split mptcp_pm_parse_addr into two functions") 8b20137012d9 ("mptcp: read attributes of addr entries managed by userspace PMs") 4638de5aefe5 ("mptcp: handle local addrs announced by userspace PMs") c682bf536cf4 ("mptcp: add pm_nl_pernet helpers")0e203c324752 ("mptcp: reset the packet scheduler on PRIO change") 4cf86ae84c71 ("mptcp: strict local address ID selection")d045b9eb95a9 ("mptcp: introduce implicit endpoints")90d930882139 ("mptcp: constify a bunch of of helpers")33397b83eee6 ("selftests: mptcp: add backup with port testcase") 09f12c3ab7a5 ("mptcp: allow to use port and non-signal in set_flags") 6a0653b96f5d ("selftests: mptcp: add fullmesh setting tests") 73c762c1f07d ("mptcp: set fullmesh flag in pm_netlink")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c07cc3ed895f9bfe0c53b5ed6be710c133b4271c Mon Sep 17 00:00:00 2001
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Wed, 28 Aug 2024 08:14:27 +0200
Subject: [PATCH] mptcp: pm: send ACK on an active subflow
Taking the first one on the list doesn't work in some cases, e.g. if the initial subflow is being removed. Pick another one instead of not sending anything.
net/mptcp/pm_netlink.c +6 -3
@@ -765,9 +765,12 @@ void mptcp_pm_nl_addr_send_ack(struct mptcp_sock *msk) !mptcp_pm_should_rm_signal(msk))return ; - subflow =list_first_entry_or_null (&msk->conn_list,typeof (*subflow), node); -if (subflow) -mptcp_pm_send_ack (msk, subflow, false, false); +mptcp_for_each_subflow (msk, subflow) { +if (__mptcp_subflow_active (subflow)) { +mptcp_pm_send_ack (msk, subflow, false, false); +break ; + } + } } int mptcp_pm_nl_mp_prio_send_ack(struct mptcp_sock *msk,
Matthieu Baerts (NGI0)
maintainerPATCH 1/1 mptcp: pm: send ACK on an active subflow
commit c07cc3ed895f9bfe0c53b5ed6be710c133b4271c upstream.
Taking the first one on the list doesn't work in some cases, e.g. if the initial subflow is being removed. Pick another one instead of not sending anything.
[ Conflicts in pm_netlink.c, because the code has been refactored in
commit f5360e9b314c ("mptcp: introduce and use mptcp_pm_send_ack()") which is difficult to backport in this version. The same adaptations have been applied: iterating over all subflows, and send the ACK on the first active subflow. ]
--- net/mptcp/pm_netlink.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
net/mptcp/pm_netlink.c +10 -8
@@ -684,16 +684,18 @@ void mptcp_pm_nl_addr_send_ack(struct mptcp_sock *msk)return ;__mptcp_flush_join_list (msk); - subflow =list_first_entry_or_null (&msk->conn_list,typeof (*subflow), node); -if (subflow) { -struct sock *ssk =mptcp_subflow_tcp_sock (subflow); +mptcp_for_each_subflow (msk, subflow) { +if (__mptcp_subflow_active (subflow)) { +struct sock *ssk =mptcp_subflow_tcp_sock (subflow); -spin_unlock_bh (&msk->pm.lock); -pr_debug ("send ack for %s\n" , -mptcp_pm_should_add_signal (msk) ?"add_addr" :"rm_addr" ); +spin_unlock_bh (&msk->pm.lock); +pr_debug ("send ack for %s\n" , +mptcp_pm_should_add_signal (msk) ?"add_addr" :"rm_addr" ); -mptcp_subflow_send_ack (ssk); -spin_lock_bh (&msk->pm.lock); +mptcp_subflow_send_ack (ssk); +spin_lock_bh (&msk->pm.lock); +break ; + } } }
Signature · 1 line
2.45.2
Patch "mptcp: pm: send ACK on an active subflow" has been added to the 5.15-stable tree
This is a note to let you know that I've just added the patch titled
mptcp: pm: send ACK on an active subflow
to the 5.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mptcp-pm-send-ack-on-an-active-subflow.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 <[email protected]> know about it.
From [email protected] Fri Sep 6 10:34:03 2024
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Fri, 6 Sep 2024 10:33:35 +0200
Subject: mptcp: pm: send ACK on an active subflow
To: [email protected], [email protected]
Cc: MPTCP Upstream <[email protected]>, "Matthieu Baerts (NGI0)" <[email protected]>, Mat Martineau <[email protected]>, Paolo Abeni <[email protected]>
Message-ID: <[email protected]>
From: "Matthieu Baerts (NGI0)" <[email protected]>
commit c07cc3ed895f9bfe0c53b5ed6be710c133b4271c upstream.
Taking the first one on the list doesn't work in some cases, e.g. if the initial subflow is being removed. Pick another one instead of not sending anything.
[ Conflicts in pm_netlink.c, because the code has been refactored in
commit f5360e9b314c ("mptcp: introduce and use mptcp_pm_send_ack()") which is difficult to backport in this version. The same adaptations have been applied: iterating over all subflows, and send the ACK on the first active subflow. ]
--- net/mptcp/pm_netlink.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
net/mptcp/pm_netlink.c +10 -8
@@ -693,16 +693,18 @@ void mptcp_pm_nl_addr_send_ack(struct mpreturn ;__mptcp_flush_join_list (msk); - subflow =list_first_entry_or_null (&msk->conn_list,typeof (*subflow), node); -if (subflow) { -struct sock *ssk =mptcp_subflow_tcp_sock (subflow); +mptcp_for_each_subflow (msk, subflow) { +if (__mptcp_subflow_active (subflow)) { +struct sock *ssk =mptcp_subflow_tcp_sock (subflow); -spin_unlock_bh (&msk->pm.lock); -pr_debug ("send ack for %s\n" , -mptcp_pm_should_add_signal (msk) ?"add_addr" :"rm_addr" ); +spin_unlock_bh (&msk->pm.lock); +pr_debug ("send ack for %s\n" , +mptcp_pm_should_add_signal (msk) ?"add_addr" :"rm_addr" ); -mptcp_subflow_send_ack (ssk); -spin_lock_bh (&msk->pm.lock); +mptcp_subflow_send_ack (ssk); +spin_lock_bh (&msk->pm.lock); +break ; + } } }
Patches currently in stable-queue which might be from [email protected] are
queue-5.15/mptcp-pm-avoid-possible-uaf-when-selecting-endp.patch queue-5.15/mptcp-pm-only-decrement-add_addr_accepted-for-mpj-req.patch queue-5.15/mptcp-pm-fullmesh-select-the-right-id-later.patch queue-5.15/mptcp-pm-skip-connecting-to-already-established-sf.patch queue-5.15/mptcp-pm-re-using-id-of-unused-flushed-subflows.patch queue-5.15/mptcp-pm-add_addr-0-is-not-a-new-address.patch queue-5.15/mptcp-constify-a-bunch-of-of-helpers.patch queue-5.15/mptcp-pm-do-not-remove-already-closed-subflows.patch queue-5.15/mptcp-pr_debug-add-missing-n-at-the-end.patch queue-5.15/mptcp-pm-check-add_addr_accept_max-before-accepting-new-add_addr.patch queue-5.15/mptcp-close-subflow-when-receiving-tcp-fin.patch queue-5.15/mptcp-avoid-duplicated-sub_closed-events.patch queue-5.15/mptcp-pm-send-ack-on-an-active-subflow.patch