All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] batman-adv: make mc_forwarding atomic
@ 2022-02-08  7:19 Sven Eckelmann
  0 siblings, 0 replies; only message in thread
From: Sven Eckelmann @ 2022-02-08  7:19 UTC (permalink / raw)
  To: linus.luessing; +Cc: b.a.t.m.a.n

From: Eric Dumazet <edumazet@google.com>

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>
---
net-next commit 145c7a793838 ("ipv6: make mc_forwarding atomic")

This still needs compat code - does anyone have ideas?

 net/batman-adv/multicast.c | 2 +-
 5 files changed, 9 insertions(+), 9 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;
-- 
2.30.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-08  7:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08  7:19 [RFC] batman-adv: make mc_forwarding atomic Sven Eckelmann

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.