]> 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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Jul 2022 11:10:33 +0000 (12:10 +0100)
commit859c4570aed8053d6fe069dcd709133d2b2711ce
tree851600a7ad0e88be1c4be1a4e6c2baaff72dd84e
parent6ccc8b7ee6025545ad0a14ab97e4bada5e479c71
cipso: Fix data-races around sysctl.

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