diff options
author | Stephen Smalley <stephen.smalley.work@gmail.com> | 2020-08-26 13:28:53 -0400 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-08-27 09:52:47 -0400 |
commit | 9ff9abc4c6be27ff27b6df625501a46711730520 (patch) | |
tree | db853e573a639e368db7ebc465b878451df612d5 /security/selinux/include/security.h | |
parent | 0256b0aa8019d937a0bdce3584c6b8b47f618202 (diff) |
selinux: move policy mutex to selinux_state, use in lockdep checks
Move the mutex used to synchronize policy changes (reloads and setting
of booleans) from selinux_fs_info to selinux_state and use it in
lockdep checks for rcu_dereference_protected() calls in the security
server functions. This makes the dependency on the mutex explicit
in the code rather than relying on comments.
Signed-off-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Reviewed-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/include/security.h')
-rw-r--r-- | security/selinux/include/security.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h index 505e51264d51..bbbf7141ccdb 100644 --- a/security/selinux/include/security.h +++ b/security/selinux/include/security.h @@ -103,6 +103,7 @@ struct selinux_state { struct selinux_avc *avc; struct selinux_policy __rcu *policy; + struct mutex policy_mutex; } __randomize_layout; void selinux_avc_init(struct selinux_avc **avc); |