]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
raw: Fix a data-race around sysctl_raw_l3mdev_accept.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 12 Jul 2022 00:15:29 +0000 (17:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:20:10 +0000 (21:20 +0200)
commit038a87b3e460d2ee579c8b1bd3890d816d6687b1
tree48ebdd7d0bebebd975f6140f6814e4c64227734a
parent38d78c7b4be7759555d45181213a7845aad279e2
raw: Fix a data-race around sysctl_raw_l3mdev_accept.

[ Upstream commit 1dace014928e6e385363032d359a04dee9158af0 ]

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

Fixes: 6897445fb194 ("net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs")
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/net/raw.h