<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Stephen Smalley &lt;sds@epoch.ncsc.mil&gt;, Arnd Bergmann &lt;arnd@arndb.de&gt;

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-&gt;htable[i] = NULL;
 	}
-	kfree(h-&gt;htable);
+	vfree(h-&gt;htable);
 }
 
 
@@ -138,7 +138,7 @@ int avtab_init(struct avtab *h)
 {
 	int i;
 
-	h-&gt;htable = kmalloc(sizeof(*(h-&gt;htable)) * AVTAB_SIZE, GFP_KERNEL);
+	h-&gt;htable = vmalloc(sizeof(*(h-&gt;htable)) * AVTAB_SIZE);
 	if (!h-&gt;htable)
 		return -ENOMEM;
 	for (i = 0; i &lt; 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 &lt;linux/in.h&gt;
 #include &lt;linux/spinlock.h&gt;
 #include &lt;linux/sched.h&gt;
+#include &lt;linux/vmalloc.h&gt;
 
 #include "flask.h"
 #include "avc.h"

_
</pre></body></html>