]> git.baikalelectronics.ru Git - kernel.git/commit
ip: Fix data-races around sysctl_ip_nonlocal_bind.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 13 Jul 2022 20:51:55 +0000 (13:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:14:11 +0000 (17:14 +0200)
commit8fdd576d208cde59a8d5cbaf25964d6fc96a24f1
treeb078985981c6002d35e8566173dc35322ac2de30
parentb939d9e739681d734a7c7aa0181cb7061eb5be0e
ip: Fix data-races around sysctl_ip_nonlocal_bind.

[ Upstream commit 325832e8978b315f88784781619b211cd6e71a9e ]

While reading sysctl_ip_nonlocal_bind, 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>
include/net/inet_sock.h
net/sctp/protocol.c