From 76fb051d42945d142fe265b6ec79e06aa9cfb250 Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 21 Nov 2016 16:07:05 +0000 Subject: [PATCH] ARM: mm: allow set_memory_*() to be used on the vmalloc region We can allow modules to be loaded into the vmalloc region, where they should also benefit from the same protections as those loaded into the more efficient module region. Allow these functions to operate there as well. Signed-off-by: Russell King --- arch/arm/mm/pageattr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mm/pageattr.c b/arch/arm/mm/pageattr.c index 6cb0d8e..3b69f26 100644 --- a/arch/arm/mm/pageattr.c +++ b/arch/arm/mm/pageattr.c @@ -55,7 +55,8 @@ static int change_memory_common(unsigned long addr, int numpages, if (!size) return 0; - if (!in_range(start, size, MODULES_VADDR, MODULES_END)) + if (!in_range(start, size, MODULES_VADDR, MODULES_END) && + !in_range(start, size, VMALLOC_START, VMALLOC_END)) return -EINVAL; data.set_mask = set_mask; -- 2.7.4