]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix data-races around sysctl_fb_tunnels_only_for_init_net.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 23 Aug 2022 17:46:56 +0000 (10:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Aug 2022 12:46:58 +0000 (13:46 +0100)
commit2939c10ce8cf51fc9b593a8006079ea2ff9db107
tree9b3e900cfdc3f2e507d8f85ec4ef9f608dfff48a
parent59f937ddc697f12a78e8b24358547f8cbf847f60
net: Fix data-races around sysctl_fb_tunnels_only_for_init_net.

While reading sysctl_fb_tunnels_only_for_init_net, it can be changed
concurrently.  Thus, we need to add READ_ONCE() to its readers.

Fixes: 2d2ab89677c2 ("net: do not create fallback tunnels for non-default namespaces")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h