aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Dumazet2023-09-21 09:27:13 +0000
committerGreg Kroah-Hartman2023-10-10 22:00:42 +0200
commita8ed1b2e1674e2fb91d3197666fdcefc45993dce (patch)
tree62c8801c686ba01b91e118216c0bce0c11e20c87 /include
parent2b76aad68b308b7ab50fe075a32b16195fb12f1c (diff)
neighbour: fix data-races around n->output
[ Upstream commit 5baa0433a15eadd729625004c37463acb982eca7 ] n->output field can be read locklessly, while a writer might change the pointer concurrently. Add missing annotations to prevent load-store tearing. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/neighbour.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index f6a8ecc6b1fa..ccc4a0f8b4ad 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -541,7 +541,7 @@ static inline int neigh_output(struct neighbour *n, struct sk_buff *skb,
READ_ONCE(hh->hh_len))
return neigh_hh_output(hh, skb);
- return n->output(n, skb);
+ return READ_ONCE(n->output)(n, skb);
}
static inline struct neighbour *