summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-09-13 04:54:23 +0200
committerJames Morris <jmorris@namei.org>2009-09-14 04:34:11 +0200
commit4e6d0bffd3d72a32b620525c9007d2482c731775 (patch)
treef4a3ff34e800be74469bec99834780b4a0294dec /security
parentSELinux: seperate avc_cache flushing (diff)
downloadlinux-4e6d0bffd3d72a32b620525c9007d2482c731775.tar.xz
linux-4e6d0bffd3d72a32b620525c9007d2482c731775.zip
SELinux: flush the avc before disabling SELinux
Before SELinux is disabled at boot it can create AVC entries. This patch will flush those entries before disabling SELinux. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/avc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index f60124623645..1ed0f076aadc 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -868,6 +868,8 @@ u32 avc_policy_seqno(void)
void avc_disable(void)
{
+ avc_flush();
+ synchronize_rcu();
if (avc_node_cachep)
kmem_cache_destroy(avc_node_cachep);
}