mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 15:33:28 +00:00
The disabled/enforcing/initialized flags are all accessed concurrently by threads so use the appropriate accessors that ensure atomicity and document that it is expected. Use smp_load/acquire...() helpers (with memory barriers) for the initialized flag, since it gates access to the rest of the state structures. Note that the disabled flag is currently not used for anything other than avoiding double disable, but it will be used for bailing out of hooks once security_delete_hooks() is removed. Signed-off-by: Ondrej Mosnacek <[email protected]> Acked-by: Stephen Smalley <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: James Morris <[email protected]> Signed-off-by: Paul Moore <[email protected]>