From: Eric Paris Date: Sun, 13 Sep 2009 02:54:23 +0000 (-0400) Subject: SELinux: flush the avc before disabling SELinux X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4e6d0bffd3d72a32b620525c9007d2482c731775;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: James Morris --- 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); }