summaryrefslogtreecommitdiff
path: root/net/batman-adv
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2022-02-04 23:15:45 +0300
committerDavid S. Miller <davem@davemloft.net>2022-02-05 18:20:34 +0300
commit145c7a793838add5e004e7d49a67654dc7eba147 (patch)
treef3b1ad3a89c446cccd1184756d0f9f527b32489d /net/batman-adv
parent3115ff3c9d3c926ee30d4f22fba2d8ffe5e413b3 (diff)
downloadlinux-145c7a793838add5e004e7d49a67654dc7eba147.tar.xz
ipv6: make mc_forwarding atomic
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>
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/multicast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
index f4004cf0ff6f..9f311fddfaf9 100644
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -134,7 +134,7 @@ static u8 batadv_mcast_mla_rtr_flags_softif_get_ipv6(struct net_device *dev)
{
struct inet6_dev *in6_dev = __in6_dev_get(dev);
- if (in6_dev && in6_dev->cnf.mc_forwarding)
+ if (in6_dev && atomic_read(&in6_dev->cnf.mc_forwarding))
return BATADV_NO_FLAGS;
else
return BATADV_MCAST_WANT_NO_RTR6;