summaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-09-21 09:27:13 +0000
committerDavid S. Miller <davem@davemloft.net>2023-10-01 17:14:37 +0100
commit5baa0433a15eadd729625004c37463acb982eca7 (patch)
tree01cade72ec39778862a6f7d97eadceaf1c9d5295 /net/bridge
parent25563b581ba3a1f263a00e8c9a97f5e7363be6fd (diff)
downloadlinux-stable-5baa0433a15eadd729625004c37463acb982eca7.tar.gz
linux-stable-5baa0433a15eadd729625004c37463acb982eca7.tar.bz2
linux-stable-5baa0433a15eadd729625004c37463acb982eca7.zip
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.c2
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;