SELinux: Reduce max avtab size to avoid page allocation failures

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Wednesday, April 14, 2010 - 6:59 pm

Gitweb:     http://git.kernel.org/linus/6c9ff1013b7a21099da838eeef7c3f23ee347957
Commit:     6c9ff1013b7a21099da838eeef7c3f23ee347957
Parent:     2ba3abd8186f24c7fb418927025b4e2120e3a362
Author:     Stephen Smalley <sds@tycho.nsa.gov>
AuthorDate: Mon Mar 15 10:42:11 2010 -0400
Committer:  James Morris <jmorris@namei.org>
CommitDate: Thu Apr 15 09:26:01 2010 +1000

    SELinux: Reduce max avtab size to avoid page allocation failures
    
    Reduce MAX_AVTAB_HASH_BITS so that the avtab allocation is an order 2
    allocation rather than an order 4 allocation on x86_64.  This
    addresses reports of page allocation failures:
    http://marc.info/?l=selinux&m=126757230625867&w=2
    https://bugzilla.redhat.com/show_bug.cgi?id=570433
    
    Reported-by:  Russell Coker <russell@coker.com.au>
    Signed-off-by:  Stephen D. Smalley <sds@tycho.nsa.gov>
    Acked-by: Eric Paris <eparis@redhat.com>
    Signed-off-by: James Morris <jmorris@namei.org>
---
 security/selinux/ss/avtab.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/security/selinux/ss/avtab.h b/security/selinux/ss/avtab.h
index 8da6a84..cd4f734 100644
--- a/security/selinux/ss/avtab.h
+++ b/security/selinux/ss/avtab.h
@@ -82,7 +82,7 @@ struct avtab_node *avtab_search_node_next(struct avtab_node *node, int specified
 void avtab_cache_init(void);
 void avtab_cache_destroy(void);
 
-#define MAX_AVTAB_HASH_BITS 13
+#define MAX_AVTAB_HASH_BITS 11
 #define MAX_AVTAB_HASH_BUCKETS (1 << MAX_AVTAB_HASH_BITS)
 #define MAX_AVTAB_HASH_MASK (MAX_AVTAB_HASH_BUCKETS-1)
 #define MAX_AVTAB_SIZE MAX_AVTAB_HASH_BUCKETS
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
SELinux: Reduce max avtab size to avoid page allocation fa ..., Linux Kernel Mailing ..., (Wed Apr 14, 6:59 pm)