All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH batadv] batman-adv: mcast: explicitly initialize mcast.num_want_all_rtr{4,6)
@ 2026-10-12 11:48 Sven Eckelmann
  2026-10-13 10:48 ` Linus Lüssing
  0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2026-10-12 11:48 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Sashiko, Sven Eckelmann

All mcast.num_want_all_* are initialized in batadv_mesh_init_late() - with
the exception of mcast.num_want_all_rtr4 + mcast.num_want_all_rtr6. At the
moment, it works because atomic_set just initializes it to 0 and the netdev
private data is already set to 0 before being passed to .ndo_init.

For consistency purposes, also initialize mcast.num_want_all_rtr4 +
mcast.num_want_all_rtr6 explicitly.

Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/bug/linux-9dbe5dec-31ae-49eb-838a-b4b92ced4ace
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 net/batman-adv/mesh-interface.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/batman-adv/mesh-interface.c b/net/batman-adv/mesh-interface.c
index 41d14863..dd624a97 100644
--- a/net/batman-adv/mesh-interface.c
+++ b/net/batman-adv/mesh-interface.c
@@ -833,6 +833,8 @@ static int batadv_meshif_init_late(struct net_device *dev)
 	atomic_set(&bat_priv->mcast.num_want_all_unsnoopables, 0);
 	atomic_set(&bat_priv->mcast.num_want_all_ipv4, 0);
 	atomic_set(&bat_priv->mcast.num_want_all_ipv6, 0);
+	atomic_set(&bat_priv->mcast.num_want_all_rtr4, 0);
+	atomic_set(&bat_priv->mcast.num_want_all_rtr6, 0);
 	atomic_set(&bat_priv->mcast.num_no_mc_ptype_capa, 0);
 #endif
 	WRITE_ONCE(bat_priv->gw.mode, BATADV_GW_MODE_OFF);

---
base-commit: 0eaac0f4187bc9b69b41d90998fd7b93ab07e53e
change-id: 20261012-mcast_atomic_init-0e096d141d43

Best regards,
--  
Sven Eckelmann <sven@narfation.org>


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

end of thread, other threads:[~2026-10-13 10:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12 11:48 [PATCH batadv] batman-adv: mcast: explicitly initialize mcast.num_want_all_rtr{4,6) Sven Eckelmann
2026-10-13 10:48 ` Linus Lüssing

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.