batman-adv: mcast: explicitly initialize mcast.num_want_all_rtr{4,6)
Sven Eckelmann
maintainerPATCH 1/1 batman-adv: mcast: explicitly initialize mcast.num_want_all_rtr{4,6)
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.
--- net/batman-adv/mesh-interface.c | 2 ++ 1 file changed, 2 insertions(+)
net/batman-adv/mesh-interface.c +2 -0
@@ -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,
Signature · 1 line
Sven Eckelmann <[email protected]>
Quoted 5 lines · 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 becauseatomic_setjust initializes it to 0 and the netdev private data is already set to 0 before being passed to .ndo_init.
Quoted 7 lines
For consistency purposes, also initialize mcast.num_want_all_rtr4 + mcast.num_want_all_rtr6 explicitly.
Reported-by Sashiko <[email protected]>Signed-off-by Sven Eckelmann <[email protected]>---