ipv6: make mc_forwarding atomic
[ Upstream commit 145c7a793838add5e004e7d49a67654dc7eba147 ] This fixes minor data-races in ip6_mc_input() and batadv_mcast_mla_rtr_flags_softif_get_ipv6() Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
5baf92a2c4
commit
fb5ac62fbe
@@ -542,7 +542,7 @@ static int inet6_netconf_fill_devconf(struct sk_buff *skb, int ifindex,
|
||||
#ifdef CONFIG_IPV6_MROUTE
|
||||
if ((all || type == NETCONFA_MC_FORWARDING) &&
|
||||
nla_put_s32(skb, NETCONFA_MC_FORWARDING,
|
||||
devconf->mc_forwarding) < 0)
|
||||
atomic_read(&devconf->mc_forwarding)) < 0)
|
||||
goto nla_put_failure;
|
||||
#endif
|
||||
if ((all || type == NETCONFA_PROXY_NEIGH) &&
|
||||
@@ -5515,7 +5515,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
|
||||
array[DEVCONF_USE_OPTIMISTIC] = cnf->use_optimistic;
|
||||
#endif
|
||||
#ifdef CONFIG_IPV6_MROUTE
|
||||
array[DEVCONF_MC_FORWARDING] = cnf->mc_forwarding;
|
||||
array[DEVCONF_MC_FORWARDING] = atomic_read(&cnf->mc_forwarding);
|
||||
#endif
|
||||
array[DEVCONF_DISABLE_IPV6] = cnf->disable_ipv6;
|
||||
array[DEVCONF_ACCEPT_DAD] = cnf->accept_dad;
|
||||
|
Reference in New Issue
Block a user