selinux: move policy mutex to selinux_state, use in lockdep checks
authorStephen Smalley <stephen.smalley.work@gmail.com>
Wed, 26 Aug 2020 17:28:53 +0000 (13:28 -0400)
committerPaul Moore <paul@paul-moore.com>
Thu, 27 Aug 2020 13:52:47 +0000 (09:52 -0400)
commit9ff9abc4c6be27ff27b6df625501a46711730520
treedb853e573a639e368db7ebc465b878451df612d5
parent0256b0aa8019d937a0bdce3584c6b8b47f618202
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>
security/selinux/hooks.c
security/selinux/include/security.h
security/selinux/selinuxfs.c
security/selinux/ss/services.c