]> git.baikalelectronics.ru Git - kernel.git/commit
cipso: Fix data-races around sysctl.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 6 Jul 2022 23:40:01 +0000 (16:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 18:59:20 +0000 (20:59 +0200)
commit25aa0cc95352d273b5f8cc71341a631d3d99ec91
tree47be03acc70c1999400c8c32f7842260f1919c3b
parentb92134197d49342c92603b9a069a0d5453074970
cipso: Fix data-races around sysctl.

[ Upstream commit 6fa6f936c1c00ce517382fe1390f915d8c411ce9 ]

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

Fixes: 3bb76b642333 ("[NetLabel]: CIPSOv4 engine")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Documentation/networking/ip-sysctl.txt
net/ipv4/cipso_ipv4.c