summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2026-01-15 12:41:37 +0300
committerSasha Levin <sashal@kernel.org>2026-03-04 15:20:45 +0300
commit55170230de661cd2301f57b222e4eb5913620af4 (patch)
tree9dd7570ab709464f89f6ca99178900eb0c6decc8 /include
parentf73528f140f17c230b4bc4dc7fd0c14983897e95 (diff)
downloadlinux-55170230de661cd2301f57b222e4eb5913620af4.tar.xz
ipv6: annotate data-races in ip6_multipath_hash_{policy,fields}()
[ Upstream commit 03e9d91dd64e2f5ea632df5d59568d91757efc4d ] Add missing READ_ONCE() when reading sysctl values. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260115094141.3124990-5-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/ipv6.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 9e5e44c6da0a..d98f5390ffad 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -1017,11 +1017,11 @@ static inline int ip6_default_np_autolabel(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)