aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/module.c')
-rw-r--r--arch/arm/kernel/module.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index 80254b47dc34..3ff571c2c71c 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -40,8 +40,15 @@
40#ifdef CONFIG_MMU 40#ifdef CONFIG_MMU
41void *module_alloc(unsigned long size) 41void *module_alloc(unsigned long size)
42{ 42{
43 void *p = __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, 43 gfp_t gfp_mask = GFP_KERNEL;
44 GFP_KERNEL, PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE, 44 void *p;
45
46 /* Silence the initial allocation */
47 if (IS_ENABLED(CONFIG_ARM_MODULE_PLTS))
48 gfp_mask |= __GFP_NOWARN;
49
50 p = __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END,
51 gfp_mask, PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE,
45 __builtin_return_address(0)); 52 __builtin_return_address(0));
46 if (!IS_ENABLED(CONFIG_ARM_MODULE_PLTS) || p) 53 if (!IS_ENABLED(CONFIG_ARM_MODULE_PLTS) || p)
47 return p; 54 return p;