Skip to content

Commit

Permalink
SELinux: flush the avc before disabling SELinux
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: James Morris <[email protected]>
  • Loading branch information
eparis authored and James Morris committed Sep 14, 2009
1 parent 008574b commit 4e6d0bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions security/selinux/avc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 4e6d0bf

Please sign in to comment.