Skip to content

Commit 92e239e

Browse files
Dwyane-Yankuba-moo
authored andcommitted
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>
1 parent 0e4ec14 commit 92e239e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/mptcp/pm_kernel.c

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

673673
void mptcp_pm_nl_rm_addr(struct mptcp_sock *msk, u8 rm_id)
674674
{
675-
if (rm_id && WARN_ON_ONCE(msk->pm.add_addr_accepted == 0)) {
675+
if (rm_id && !WARN_ON_ONCE(msk->pm.add_addr_accepted == 0)) {
676676
u8 limit_add_addr_accepted =
677677
mptcp_pm_get_limit_add_addr_accepted(msk);
678678

0 commit comments

Comments
 (0)