diff options
author | Eric Dumazet <edumazet@google.com> | 2022-02-04 12:15:45 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-13 20:59:03 +0200 |
commit | 4790998fdd0d0c682512af9b4a875bc80da73836 (patch) | |
tree | ac9f73ace8cf66d5673ef00d1c43f3d58c3be308 /net/batman-adv | |
parent | e9da1df2c021642a0541eaf2add19dbe0d9e7685 (diff) | |
download | linux-stable-4790998fdd0d0c682512af9b4a875bc80da73836.tar.gz linux-stable-4790998fdd0d0c682512af9b4a875bc80da73836.tar.bz2 linux-stable-4790998fdd0d0c682512af9b4a875bc80da73836.zip |
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>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/multicast.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c index 6e3419beca09..2853634a3979 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; |