FAILED: patch "[PATCH] mptcp: hold pm lock when deleting entry" failed to apply to 6.1-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.1-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-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x f642c5c4d528d11bd78b6c6f84f541cd3c0bea86
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024111712-unnerving-implicate-ad47@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From f642c5c4d528d11bd78b6c6f84f541cd3c0bea86 Mon Sep 17 00:00:00 2001
From: Geliang Tang <[email protected]>
Date: Tue, 12 Nov 2024 20:18:34 +0100
Subject: [PATCH] mptcp: hold pm lock when deleting entry
When traversing userspace_pm_local_addr_list and deleting an entry from it in mptcp_pm_nl_remove_doit(), msk->pm.lock should be held.
This patch holds this lock before mptcp_userspace_pm_lookup_addr_by_id() and releases it after list_move() in mptcp_pm_nl_remove_doit().
net/mptcp/pm_userspace.c +3 -0
@@ -308,14 +308,17 @@ int mptcp_pm_nl_remove_doit(struct sk_buff *skb, struct genl_info *info)lock_sock (sk); +spin_lock_bh (&msk->pm.lock); match =mptcp_userspace_pm_lookup_addr_by_id (msk, id_val);if (!match) {GENL_SET_ERR_MSG (info,"address with specified id not found" ); +spin_unlock_bh (&msk->pm.lock);release_sock (sk); goto out; }list_move (&match->list, &free_list); +spin_unlock_bh (&msk->pm.lock);mptcp_pm_remove_addrs (msk, &free_list);