summaryrefslogtreecommitdiff
path: root/security/selinux
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-09-12 22:54:23 -0400
committerJames Morris <jmorris@namei.org>2009-09-14 12:34:11 +1000
commit4e6d0bffd3d72a32b620525c9007d2482c731775 (patch)
treef4a3ff34e800be74469bec99834780b4a0294dec /security/selinux
parent008574b11171a1ee9583a00188e27ff9e0432061 (diff)
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/selinux')
-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);
}