From: Eric Dumazet Date: Thu, 15 Jan 2026 09:41:37 +0000 (+0000) Subject: ipv6: annotate data-races in ip6_multipath_hash_{policy,fields}() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03e9d91dd64e2f5ea632df5d59568d91757efc4d;p=thirdparty%2Fkernel%2Flinux.git ipv6: annotate data-races in ip6_multipath_hash_{policy,fields}() Add missing READ_ONCE() when reading sysctl values. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Link: https://patch.msgid.link/20260115094141.3124990-5-edumazet@google.com Signed-off-by: Jakub Kicinski --- diff --git a/include/net/ipv6.h b/include/net/ipv6.h index f39cd85e89123..c7f597da01cd9 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)