aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/module.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-22 12:38:40 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-22 12:38:40 -0700
commit17238005f377888b9d4583835205c77e3d781bb8 (patch)
tree9cad40902138d08a2694f87736cfebd031dc9542 /arch/parisc/kernel/module.c
parent34ea646c9f8c18fd2e4332ff3b2b509f878c56f1 (diff)
parent7fe2ac6882f74e8bd5b3891f63c09cb10aee9d03 (diff)
downloadkernel_samsung_smdk4412-17238005f377888b9d4583835205c77e3d781bb8.tar.gz
kernel_samsung_smdk4412-17238005f377888b9d4583835205c77e3d781bb8.tar.bz2
kernel_samsung_smdk4412-17238005f377888b9d4583835205c77e3d781bb8.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6: [PARISC] wire up syncfs syscall [PARISC] wire up the fhandle syscalls [PARISC] wire up clock_adjtime syscall [PARISC] wire up fanotify syscalls [PARISC] prevent speculative re-read on cache flush [PARISC] only make executable areas executable [PARISC] fix pacache .size with new binutils
Diffstat (limited to 'arch/parisc/kernel/module.c')
-rw-r--r--arch/parisc/kernel/module.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index 6e81bb596e5..cedbbb8b18d 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -61,8 +61,10 @@
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/bug.h>
+#include <linux/mm.h>
#include <linux/slab.h>
+#include <asm/pgtable.h>
#include <asm/unwind.h>
#if 0
@@ -214,7 +216,13 @@ void *module_alloc(unsigned long size)
{
if (size == 0)
return NULL;
- return vmalloc(size);
+ /* using RWX means less protection for modules, but it's
+ * easier than trying to map the text, data, init_text and
+ * init_data correctly */
+ return __vmalloc_node_range(size, 1, VMALLOC_START, VMALLOC_END,
+ GFP_KERNEL | __GFP_HIGHMEM,
+ PAGE_KERNEL_RWX, -1,
+ __builtin_return_address(0));
}
#ifndef CONFIG_64BIT