summaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-03-13 20:17:31 +0000
committerJakub Kicinski <kuba@kernel.org>2023-03-15 00:37:32 -0700
commitb071af523579df7341cabf0f16fc661125e9a13f (patch)
tree5fa71bee995c95b37e5c7d336ce22bbebb3417a0 /net/ipv4/route.c
parent68a84a127bb07d2a47e95c808520f742c54781c7 (diff)
downloadlinux-stable-b071af523579df7341cabf0f16fc661125e9a13f.tar.gz
linux-stable-b071af523579df7341cabf0f16fc661125e9a13f.tar.bz2
linux-stable-b071af523579df7341cabf0f16fc661125e9a13f.zip
neighbour: annotate lockless accesses to n->nud_state
We have many lockless accesses to n->nud_state. Before adding another one in the following patch, add annotations to readers and writers. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Reviewed-by: Martin KaFai Lau <martin.lau@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index de6e3515ab4f..232009d216c4 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -784,7 +784,7 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow
if (!n)
n = neigh_create(&arp_tbl, &new_gw, rt->dst.dev);
if (!IS_ERR(n)) {
- if (!(n->nud_state & NUD_VALID)) {
+ if (!(READ_ONCE(n->nud_state) & NUD_VALID)) {
neigh_event_send(n, NULL);
} else {
if (fib_lookup(net, fl4, &res, 0) == 0) {