]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Fix data-races around sysctl_ip_dynaddr.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 12 Jul 2022 00:15:32 +0000 (17:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:24:28 +0000 (21:24 +0200)
commitac746f6dfe37ff67d95f563b07fa5d6110bfd9cb
treef57ee595479396715e3023d54a8cdb185f7ad7e3
parentb1aa80e18b4d277e3dfcc01f955082e3f8a9a713
ipv4: Fix data-races around sysctl_ip_dynaddr.

[ Upstream commit 6ec8b4da081476c48417184be7a220690623396f ]

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

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>
Documentation/networking/ip-sysctl.rst
net/ipv4/af_inet.c