]> www.infradead.org Git - users/dwmw2/linux.git/commit
inetpeer: Fix data-races around sysctl.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 6 Jul 2022 23:39:59 +0000 (16:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:20:07 +0000 (21:20 +0200)
commitd54b6ef53cbcc40c61e83e7410451e19a038e6b0
tree0de53687efebac093f7873b13f56d4c88acf59d2
parent6481a8a72a746dc96e3aa70a9f9f6d3daf0f88c2
inetpeer: Fix data-races around sysctl.

[ Upstream commit 3d32edf1f3c38d3301f6434e56316f293466d7fb ]

While reading inetpeer sysctl variables, they can be changed
concurrently.  So, we need to add READ_ONCE() to avoid data-races.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
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>
net/ipv4/inetpeer.c