tipc: fix rc_dests counter corruption on reinit
Subsystems (3)
PATCH 1/1 tipc: fix rc_dests counter corruption on reinit
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.
--- net/tipc/name_distr.c | 1 - 1 file changed, 1 deletion(-)
net/tipc/name_distr.c +0 -1
@@ -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
Tung Quang Nguyen
maintainerQuoted 1 line
Subject: [PATCH net] tipc: fix
rc_destscounter corruption on reinit
This is part of my on-going series: https://lore.kernel.org/all/[email protected]/
I will send new version soon.
---
pw-bot: rejected