Skip to content
Snippets Groups Projects
Commit 8861d0af authored by Lakshmi Ramasubramanian's avatar Lakshmi Ramasubramanian Committed by Paul Moore
Browse files

selinux: Add helper functions to get and set checkreqprot


checkreqprot data member in selinux_state struct is accessed directly by
SELinux functions to get and set. This could cause unexpected read or
write access to this data member due to compiler optimizations and/or
compiler's reordering of access to this field.

Add helper functions to get and set checkreqprot data member in
selinux_state struct. These helper functions use READ_ONCE and
WRITE_ONCE macros to ensure atomic read or write of memory for
this data member.

Signed-off-by: default avatarLakshmi Ramasubramanian <nramas@linux.microsoft.com>
Suggested-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
Suggested-by: default avatarPaul Moore <paul@paul-moore.com>
Acked-by: default avatarStephen Smalley <stephen.smalley.work@gmail.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent e8ba53d0
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment