]> git.baikalelectronics.ru Git - kernel.git/commit
neighbour: fix data-races around n->output
authorEric Dumazet <edumazet@google.com>
Thu, 21 Sep 2023 09:27:13 +0000 (09:27 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Oct 2023 20:00:42 +0000 (22:00 +0200)
commita8ed1b2e1674e2fb91d3197666fdcefc45993dce
tree62c8801c686ba01b91e118216c0bce0c11e20c87
parent2b76aad68b308b7ab50fe075a32b16195fb12f1c
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>
include/net/neighbour.h
net/bridge/br_netfilter_hooks.c
net/core/neighbour.c