]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2022 15:15:21 +0000 (17:15 +0200)
commit371a3bcf3144584c511f80e87d4c28ac2c75e9a7
tree90ddc8c712350cb5d2a6ac59a51c497d16369c11
parentc3bda708e9c40d0a88f3c86c3d9103db44b38c0b
net: Fix data-races around sysctl_fb_tunnels_only_for_init_net.

[ Upstream commit af67508ea6cbf0e4ea27f8120056fa2efce127dd ]

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: 79134e6ce2c9 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/netdevice.h