MPTCP Linux Development
 help / color / mirror / Atom feed
* [PATCH, mptcp-net] mptcp: fix address removal logic in mptcp_pm_nl_rm_addr
@ 2025-11-04 12:34 Gang Yan
  2025-11-04 13:49 ` MPTCP CI
  2025-11-04 14:34 ` Matthieu Baerts
  0 siblings, 2 replies; 6+ messages in thread
From: Gang Yan @ 2025-11-04 12:34 UTC (permalink / raw)
  To: mptcp; +Cc: Gang Yan

From: Gang Yan <yangang@kylinos.cn>

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>
---
 net/mptcp/pm_kernel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/pm_kernel.c b/net/mptcp/pm_kernel.c
index a3f654ba9dbe..cb3ebb2efd00 100644
--- a/net/mptcp/pm_kernel.c
+++ b/net/mptcp/pm_kernel.c
@@ -682,7 +682,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)) {
 		u8 limit_add_addr_accepted =
 			mptcp_pm_get_limit_add_addr_accepted(msk);
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-11-05 11:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04 12:34 [PATCH, mptcp-net] mptcp: fix address removal logic in mptcp_pm_nl_rm_addr Gang Yan
2025-11-04 13:49 ` MPTCP CI
2025-11-04 14:34 ` Matthieu Baerts
2025-11-05  2:13   ` GangYan
2025-11-05  2:19     ` GangYan
2025-11-05 11:22     ` Matthieu Baerts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox