mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net] tipc: fix rc_dests counter corruption on reinit
@ 2026-11-14 16:29 Ömer Mete Kaya
  2026-11-14 16:53 ` Tung Quang Nguyen
  0 siblings, 1 reply; 2+ messages in thread
From: Ömer Mete Kaya @ 2026-11-14 16:29 UTC (permalink / raw)
  To: Jon Maloy, Tung Quang Nguyen
  Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Hoang Huu Le, netdev, tipc-discussion,
	linux-kernel, Ömer Mete Kaya

tipc_named_reinit() unconditionally resets rc_dests to zero while
re-initializing local publications. However, node-up events may
already have incremented rc_dests for peers without
TIPC_NAMED_BCAST capability before network finalization.

The reset discards these counts. When such peers later disconnect,
tipc_publ_notify() decrements the already-zero u32 counter, wrapping
it to UINT32_MAX and permanently forcing replicast distribution.

Remove the unnecessary rc_dests reset from tipc_named_reinit(),
which only updates local publication addresses and has no reason to
touch the remote peer counter.

Discovered by Sashiko, not triggered, not runtime tested.

Fixes: cad2929dc432 ("tipc: update a binding service via broadcast")
Signed-off-by: Ömer Mete Kaya <omermetekaya0@gmail.com>
---
 net/tipc/name_distr.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index ba4f4906e13b..1dfe8475a75d 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -415,6 +415,5 @@ void tipc_named_reinit(struct net *net)
 		p->sk.node = self;
 	list_for_each_entry_rcu(p, &nt->cluster_scope, binding_node)
 		p->sk.node = self;
-	nt->rc_dests = 0;
 	spin_unlock_bh(&tn->nametbl_lock);
 }
--
2.56.0


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

* Re: [PATCH net] tipc: fix rc_dests counter corruption on reinit
  2026-11-14 16:29 [PATCH net] tipc: fix rc_dests counter corruption on reinit Ömer Mete Kaya
@ 2026-11-14 16:53 ` Tung Quang Nguyen
  0 siblings, 0 replies; 2+ messages in thread
From: Tung Quang Nguyen @ 2026-11-14 16:53 UTC (permalink / raw)
  To: Ömer Mete Kaya
  Cc: Jon Maloy, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Simon Horman, netdev, tipc-discussion, linux-kernel

> Subject: [PATCH net] tipc: fix rc_dests counter corruption on reinit

This is part of my on-going series: https://lore.kernel.org/all/20261102034207.10639-4-tung.quang.nguyen@est.tech/
I will send new version soon.

---
pw-bot: rejected



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

end of thread, other threads:[~2026-11-14 16:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-14 16:29 [PATCH net] tipc: fix rc_dests counter corruption on reinit Ömer Mete Kaya
2026-11-14 16:53 ` Tung Quang Nguyen

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

all inboxes | Powered by JetHome®