summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/pageattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm/pageattr.c')
-rw-r--r--arch/arm/mm/pageattr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mm/pageattr.c b/arch/arm/mm/pageattr.c
index 004e35c..cf30daf 100644
--- a/arch/arm/mm/pageattr.c
+++ b/arch/arm/mm/pageattr.c
@@ -49,7 +49,10 @@ static int change_memory_common(unsigned long addr, int numpages,
WARN_ON_ONCE(1);
}
- if (!is_module_address(start) || !is_module_address(end - 1))
+ if (start < MODULES_VADDR || start >= MODULES_END)
+ return -EINVAL;
+
+ if (end < MODULES_VADDR || start >= MODULES_END)
return -EINVAL;
data.set_mask = set_mask;
OpenPOWER on IntegriCloud