Skip to content

Commit f8de08c

Browse files
committed
mptcp: fix address removal logic in mptcp_pm_nl_rm_addr
JIRA: https://issues.redhat.com/browse/RHEL-115576 Upstream Status: net-next.git commit 92e239e Conflicts: net/mptcp/pm_kernel.c: context mismatch because of missing backport of upstream commit 37712d8 ("mptcp: pm: in-kernel: rename 'add_addr_accept_max' to 'limit_add_addr_accepted'") commit 92e239e Author: Gang Yan <yangang@kylinos.cn> Date: Tue Nov 18 08:20:28 2025 +0100 mptcp: fix address removal logic in mptcp_pm_nl_rm_addr Fix inverted WARN_ON_ONCE condition that prevented normal address removal counter updates. The current code only executes decrement logic when the counter is already 0 (abnormal state), while normal removals (counter > 0) are ignored. Signed-off-by: Gang Yan <yangang@kylinos.cn> Fixes: 6361139 ("mptcp: pm: remove '_nl' from mptcp_pm_nl_rm_addr_received") Cc: stable@vger.kernel.org Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20251118-net-mptcp-misc-fixes-6-18-rc6-v1-10-806d3781c95f@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Davide Caratti <dcaratti@redhat.com>
1 parent c6c52bd commit f8de08c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mptcp/pm_kernel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ static void mptcp_pm_nl_add_addr_received(struct mptcp_sock *msk)
542542

543543
void mptcp_pm_nl_rm_addr(struct mptcp_sock *msk, u8 rm_id)
544544
{
545-
if (rm_id && WARN_ON_ONCE(msk->pm.add_addr_accepted == 0)) {
545+
if (rm_id && !WARN_ON_ONCE(msk->pm.add_addr_accepted == 0)) {
546546
/* Note: if the subflow has been closed before, this
547547
* add_addr_accepted counter will not be decremented.
548548
*/

0 commit comments

Comments
 (0)