mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 04:47:05 +00:00
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>
This commit is contained in:
parent
fca34cc075
commit
e248948a44
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue