]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix a data-race around sysctl_net_busy_read.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 23 Aug 2022 17:46:52 +0000 (10:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:27:42 +0000 (10:27 +0200)
commit88586db3072096c47c83903b948db9763505af16
tree06d7fa9cd36958dbdab2fe4cfb61e92d15c83d8c
parent23d4a59be4a8b415d97d2003660987cf585bd324
net: Fix a data-race around sysctl_net_busy_read.

[ Upstream commit 0d687ff07049b52c4701143190ee9644bc3ac4bf ]

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

Fixes: 140b2650cf6d ("net: poll/select low latency socket support")
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/core/sock.c