aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorChris Wright <chrisw@osdl.org>2004-07-04 20:25:23 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-07-04 20:25:23 -0700
commitd530d5d3250e9927193734fc32b6b0e8384dbc04 (patch)
tree4abd116bba0cf0f6f80603055f6dd2e039a48c65 /security
parent0e14bcc4cd6af137fd2faf9f993f15e16698d585 (diff)
downloadhistory-d530d5d3250e9927193734fc32b6b0e8384dbc04.tar.gz
[PATCH] selinux space saving
Move inline avc_cache_stats helper functions alongside the statically declared avc_cache_stats array. Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/avc.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index af92f446343f9..75e94884a278d 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -71,10 +71,10 @@ struct avc_callback_node {
};
static spinlock_t avc_lock = SPIN_LOCK_UNLOCKED;
-static struct avc_node *avc_node_freelist = NULL;
+static struct avc_node *avc_node_freelist;
static struct avc_cache avc_cache;
static unsigned avc_cache_stats[AVC_NSTATS];
-static struct avc_callback_node *avc_callbacks = NULL;
+static struct avc_callback_node *avc_callbacks;
static inline int avc_hash(u32 ssid, u32 tsid, u16 tclass)
{
@@ -191,15 +191,6 @@ void __init avc_init(void)
struct avc_node *new;
int i;
- for (i = 0; i < AVC_NSTATS; i++)
- avc_cache_stats[i] = 0;
-
- for (i = 0; i < AVC_CACHE_SLOTS; i++)
- avc_cache.slots[i] = 0;
- avc_cache.lru_hint = 0;
- avc_cache.active_nodes = 0;
- avc_cache.latest_notif = 0;
-
for (i = 0; i < AVC_CACHE_MAXNODES; i++) {
new = kmalloc(sizeof(*new), GFP_ATOMIC);
if (!new) {