aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-08-31 04:31:18 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-08-31 04:31:18 -0700
commit696bce2128ec8a2a184703a7e02f2538792d617d (patch)
treeab557d7f91b2dc3bfab4ce3b7c46ff93424ed751 /security
parent4218788bbb564ec2c9477d772bd5675cd904b8f1 (diff)
downloadhistory-696bce2128ec8a2a184703a7e02f2538792d617d.tar.gz
[PATCH] Fix SELinux avtab
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.
Diffstat (limited to 'security')
-rw-r--r--security/selinux/ss/avtab.c4
-rw-r--r--security/selinux/ss/global.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c
index 461f0f8b03b31e..df67d3a2b1d1b8 100644
--- a/security/selinux/ss/avtab.c
+++ b/security/selinux/ss/avtab.c
@@ -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 --git a/security/selinux/ss/global.h b/security/selinux/ss/global.h
index 2358c85da0ae91..dfb799faf32ff8 100644
--- a/security/selinux/ss/global.h
+++ b/security/selinux/ss/global.h
@@ -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"