From: Gang Yan <[email protected]>

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 <[email protected]>
Fixes: 636113918508 ("mptcp: pm: remove '_nl' from 
mptcp_pm_nl_rm_addr_received")
Cc: [email protected]
Reviewed-by: Matthieu Baerts (NGI0) <[email protected]>
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
---
 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 2ae95476dba3..0a50fd5edc06 100644
--- a/net/mptcp/pm_kernel.c
+++ b/net/mptcp/pm_kernel.c
@@ -672,7 +672,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.51.0


Reply via email to