diff options
| author | Gang Yan <yangang@kylinos.cn> | 2025-11-24 22:58:42 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-12-01 11:46:07 +0100 |
| commit | f7d953c38245c0e9d8e268fb6a9e524602fb44ec (patch) | |
| tree | 4217c7136ec3aeaec6df19b94d4c294f9204d012 /net | |
| parent | 81a8685cac4bf081c93a7df591644f4f80240bb9 (diff) | |
| download | linux-f7d953c38245c0e9d8e268fb6a9e524602fb44ec.tar.gz linux-f7d953c38245c0e9d8e268fb6a9e524602fb44ec.tar.bz2 linux-f7d953c38245c0e9d8e268fb6a9e524602fb44ec.zip | |
mptcp: fix address removal logic in mptcp_pm_nl_rm_addr
[ Upstream commit 92e239e36d600002559074994a545fcfac9afd2d ]
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: 636113918508 ("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>
[ Context ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/mptcp/pm_kernel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mptcp/pm_kernel.c b/net/mptcp/pm_kernel.c index 07f50d0304cf..f72892b7abc3 100644 --- a/net/mptcp/pm_kernel.c +++ b/net/mptcp/pm_kernel.c @@ -548,7 +548,7 @@ static void mptcp_pm_nl_add_addr_received(struct mptcp_sock *msk) void mptcp_pm_nl_rm_addr(struct mptcp_sock *msk, u8 rm_id) { - if (rm_id && WARN_ON_ONCE(msk->pm.add_addr_accepted == 0)) { + if (rm_id && !WARN_ON_ONCE(msk->pm.add_addr_accepted == 0)) { /* Note: if the subflow has been closed before, this * add_addr_accepted counter will not be decremented. */ |
