diff options
| author | Eric Dumazet <edumazet@google.com> | 2026-01-15 09:41:37 +0000 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2026-03-04 07:20:26 -0500 |
| commit | 06503e360d35fbde2274cbf2a46edf478d81f4fe (patch) | |
| tree | 2f30da72a7638eee292258312caaa861aecd949d | |
| parent | aee760f86212c7f0ca2c8ba9b812e7988b4616fc (diff) | |
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>
| -rw-r--r-- | include/net/ipv6.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 3bf743d601e1..f4307b35294c 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -982,11 +982,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) |
