From: Stephen Smalley <sds@epoch.ncsc.mil>, Arnd Bergmann <arnd@arndb.de>

This patch changes the SELinux avtab to use vmalloc/vfree; the table is too
large for kmalloc on s390.



 25-akpm/security/selinux/ss/avtab.c  |    4 ++--
 25-akpm/security/selinux/ss/global.h |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff -puN security/selinux/ss/avtab.c~selinux-avtab-fix security/selinux/ss/avtab.c
--- 25/security/selinux/ss/avtab.c~selinux-avtab-fix	Tue Aug 26 12:28:13 2003
+++ 25-akpm/security/selinux/ss/avtab.c	Tue Aug 26 12:28:13 2003
@@ -106,7 +106,7 @@ void avtab_destroy(struct avtab *h)
 		}
 		h->htable[i] = NULL;
 	}
-	kfree(h->htable);
+	vfree(h->htable);
 }
 
 
@@ -138,7 +138,7 @@ int avtab_init(struct avtab *h)
 {
 	int i;
 
-	h->htable = kmalloc(sizeof(*(h->htable)) * AVTAB_SIZE, GFP_KERNEL);
+	h->htable = vmalloc(sizeof(*(h->htable)) * AVTAB_SIZE);
 	if (!h->htable)
 		return -ENOMEM;
 	for (i = 0; i < AVTAB_SIZE; i++)
diff -puN security/selinux/ss/global.h~selinux-avtab-fix security/selinux/ss/global.h
--- 25/security/selinux/ss/global.h~selinux-avtab-fix	Tue Aug 26 12:28:13 2003
+++ 25-akpm/security/selinux/ss/global.h	Tue Aug 26 12:28:13 2003
@@ -8,6 +8,7 @@
 #include <linux/in.h>
 #include <linux/spinlock.h>
 #include <linux/sched.h>
+#include <linux/vmalloc.h>
 
 #include "flask.h"
 #include "avc.h"

_