aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/include
diff options
context:
space:
mode:
authorThomas Liu <tliu@redhat.com>2009-06-24 17:58:05 -0400
committerJames Morris <jmorris@namei.org>2009-06-24 18:29:16 -0400
commit89c86576ecde504da1eeb4f4882b2189ac2f9c4a (patch)
tree94674a48becd9cfde298e9fe6b58db8da28fe238 /security/selinux/include
parenta893a84e8799270fbec5c3708d001650aab47138 (diff)
selinux: clean up avc node cache when disabling selinux
Added a call to free the avc_node_cache when inside selinux_disable because it should not waste resources allocated during avc_init if SELinux is disabled and the cache will never be used. Signed-off-by: Thomas Liu <tliu@redhat.com> Acked-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/include')
-rw-r--r--security/selinux/include/avc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/selinux/include/avc.h b/security/selinux/include/avc.h
index 46a940d9af67..ae4c3a0e2c1a 100644
--- a/security/selinux/include/avc.h
+++ b/security/selinux/include/avc.h
@@ -131,6 +131,9 @@ int avc_add_callback(int (*callback)(u32 event, u32 ssid, u32 tsid,
131int avc_get_hash_stats(char *page); 131int avc_get_hash_stats(char *page);
132extern unsigned int avc_cache_threshold; 132extern unsigned int avc_cache_threshold;
133 133
134/* Attempt to free avc node cache */
135void avc_disable(void);
136
134#ifdef CONFIG_SECURITY_SELINUX_AVC_STATS 137#ifdef CONFIG_SECURITY_SELINUX_AVC_STATS
135DECLARE_PER_CPU(struct avc_cache_stats, avc_cache_stats); 138DECLARE_PER_CPU(struct avc_cache_stats, avc_cache_stats);
136#endif 139#endif