From: Shailendra Verma <[email protected]>
The module end was not aligned as of module start, so
aligning end also.
Signed-off-by: Shailendra Verma <[email protected]>
Reviewed-by: Ravikant Bijendra Sharma <[email protected]>
---
linux-4.3-rc6/arch/arm64/mm/pageattr.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/linux-4.3-rc6/arch/arm64/mm/pageattr.c b/linux-4.3-rc6/arch/arm64/mm/pageattr.c
index e47ed1c..70e7a4c 100644
--- a/linux-4.3-rc6/arch/arm64/mm/pageattr.c
+++ b/linux-4.3-rc6/arch/arm64/mm/pageattr.c
@@ -45,10 +45,9 @@ static int change_memory_common(unsigned long addr, int numpages,
int ret;
struct page_change_data data;
- if (!IS_ALIGNED(addr, PAGE_SIZE)) {
+ if (WARN_ON_ONCE(!IS_ALIGNED(addr, PAGE_SIZE))) {
start &= PAGE_MASK;
- end = start + size;
- WARN_ON_ONCE(1);
+ end = PAGE_ALIGN(end);
}
if (start < MODULES_VADDR || start >= MODULES_END)
--
1.7.9.5