diff options
author | Eric Dumazet <edumazet@google.com> | 2023-09-21 12:27:13 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-01 19:14:37 +0300 |
commit | 5baa0433a15eadd729625004c37463acb982eca7 (patch) | |
tree | 01cade72ec39778862a6f7d97eadceaf1c9d5295 /net/bridge | |
parent | 25563b581ba3a1f263a00e8c9a97f5e7363be6fd (diff) | |
download | linux-5baa0433a15eadd729625004c37463acb982eca7.tar.xz |
neighbour: fix data-races around n->output
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>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_netfilter_hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c index 15186247b59a..033034d68f1f 100644 --- a/net/bridge/br_netfilter_hooks.c +++ b/net/bridge/br_netfilter_hooks.c @@ -294,7 +294,7 @@ int br_nf_pre_routing_finish_bridge(struct net *net, struct sock *sk, struct sk_ /* tell br_dev_xmit to continue with forwarding */ nf_bridge->bridged_dnat = 1; /* FIXME Need to refragment */ - ret = neigh->output(neigh, skb); + ret = READ_ONCE(neigh->output)(neigh, skb); } neigh_release(neigh); return ret; |