diff options
author | James Bottomley <jbottomley@parallels.com> | 2011-05-22 11:04:55 +0400 |
---|---|---|
committer | James Bottomley <jbottomley@parallels.com> | 2011-05-22 11:04:55 +0400 |
commit | 7fe2ac6882f74e8bd5b3891f63c09cb10aee9d03 (patch) | |
tree | 3358215354ae27d86411963ab33c2d8f07c5e427 /arch/parisc/kernel/module.c | |
parent | 2e7bad5f34b5beed47542490c760ed26574e38ba (diff) | |
parent | b7d45818444a31948cfc7849136013a0ea54b2fb (diff) |
Merge branch 'flushing' into for-linus
Diffstat (limited to 'arch/parisc/kernel/module.c')
-rw-r--r-- | arch/parisc/kernel/module.c | 10 |
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 |