summaryrefslogtreecommitdiff
path: root/include/net/ip6_route.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-02-28 13:54:28 +0000
committerDavid S. Miller <davem@davemloft.net>2024-03-01 08:42:31 +0000
commite7135f484994494a38071e3653a83d21d305f50c (patch)
tree734c791bf55fa4646d61929ada3684bc5de0791f /include/net/ip6_route.h
parent553ced03b227c99f0bf68d86f7b45ed7125563f2 (diff)
ipv6: annotate data-races around cnf.mtu6
idev->cnf.mtu6 might be read locklessly, add appropriate READ_ONCE() and WRITE_ONCE() annotations. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip6_route.h')
-rw-r--r--include/net/ip6_route.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 52a51c69aa9d..a30c6aa9e5cf 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -332,7 +332,7 @@ static inline unsigned int ip6_dst_mtu_maybe_forward(const struct dst_entry *dst
rcu_read_lock();
idev = __in6_dev_get(dst->dev);
if (idev)
- mtu = idev->cnf.mtu6;
+ mtu = READ_ONCE(idev->cnf.mtu6);
rcu_read_unlock();
out: