Commit 696bce21 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[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.
parent 4218788b
......@@ -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++)
......
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment