aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorGravatar Eric Dumazet <edumazet@google.com> 2024-02-28 13:54:33 +0000
committerGravatar David S. Miller <davem@davemloft.net> 2024-03-01 08:42:32 +0000
commite248948a4471c6efca19f7c5e657b30ee67a6485 (patch)
treefcd4e8cc65816770766a5e569f3edbf6e7e8f678 /net
parentipv6: annotate data-races around idev->cnf.ignore_routes_with_linkdown (diff)
downloadlinux-e248948a4471c6efca19f7c5e657b30ee67a6485.tar.gz
linux-e248948a4471c6efca19f7c5e657b30ee67a6485.tar.bz2
linux-e248948a4471c6efca19f7c5e657b30ee67a6485.zip
ipv6: annotate data-races in rt6_probe()
Use READ_ONCE() while reading idev->cnf.rtr_probe_interval while its value could be changed. 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 'net')
-rw-r--r--net/ipv6/route.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 6a2b53de4818..1b897c57c55f 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -645,14 +645,15 @@ static void rt6_probe(struct fib6_nh *fib6_nh)
write_lock_bh(&neigh->lock);
if (!(neigh->nud_state & NUD_VALID) &&
time_after(jiffies,
- neigh->updated + idev->cnf.rtr_probe_interval)) {
+ neigh->updated +
+ READ_ONCE(idev->cnf.rtr_probe_interval))) {
work = kmalloc(sizeof(*work), GFP_ATOMIC);
if (work)
__neigh_set_probe_once(neigh);
}
write_unlock_bh(&neigh->lock);
} else if (time_after(jiffies, last_probe +
- idev->cnf.rtr_probe_interval)) {
+ READ_ONCE(idev->cnf.rtr_probe_interval))) {
work = kmalloc(sizeof(*work), GFP_ATOMIC);
}