Thread (11 messages) 11 messages, 3 authors, 2026-01-19
STALE190d

[PATCH net-next 4/8] ipv6: annotate data-races in ip6_multipath_hash_{policy,fields}()

From: Eric Dumazet <edumazet@google.com>
Date: 2026-01-15 09:41:52
Subsystem: networking [general], networking [ipv4/ipv6], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern, Ido Schimmel, Linus Torvalds

Add missing READ_ONCE() when reading sysctl values.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 include/net/ipv6.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index f39cd85e89123a06f7660868ef42c8050d693fbf..c7f597da01cd92293b9ffbd9e692dea75fd581b8 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -1014,11 +1014,11 @@ static inline int ip6_default_np_autolabel(const struct net *net)
 #if IS_ENABLED(CONFIG_IPV6)
 static inline int ip6_multipath_hash_policy(const struct net *net)
 {
-	return net->ipv6.sysctl.multipath_hash_policy;
+	return READ_ONCE(net->ipv6.sysctl.multipath_hash_policy);
 }
 static inline u32 ip6_multipath_hash_fields(const struct net *net)
 {
-	return net->ipv6.sysctl.multipath_hash_fields;
+	return READ_ONCE(net->ipv6.sysctl.multipath_hash_fields);
 }
 #else
 static inline int ip6_multipath_hash_policy(const struct net *net)
-- 
2.52.0.457.g6b5491de43-goog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help