]> git.itanic.dy.fi Git - linux-stable/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:26:31 +0000 (10:26 +0200)
commitd908fd060927cf23bae5b2975140c7ed81bd4013
tree4c2a87c334917000bf9aab0738f86e1f8e792104
parentda89cab514b3ec7fdedb378617160c47fe3b60a9
net: Fix a data-race around sysctl_net_busy_read.

[ Upstream commit e59ef36f0795696ab229569c153936bfd068d21c ]

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

Fixes: 2d48d67fa8cd ("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