From b4da1840dc4d92f05419bd2abbde82131d4301d9 Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Thu, 11 Sep 2014 23:10:32 +0100 Subject: [PATCH] arm64: pageattr: Correctly adjust unaligned start addresses The start address needs to be actually updated after it is detected to be unaligned. Adjust it and the end address properly. Reported-by: Zi Shen Lim Reviewed-by: Zi Shen Lim Signed-off-by: Laura Abbott Signed-off-by: Catalin Marinas --- arch/arm64/mm/pageattr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/mm/pageattr.c b/arch/arm64/mm/pageattr.c index 75e744e4cec5..bb0ea94c4ba1 100644 --- a/arch/arm64/mm/pageattr.c +++ b/arch/arm64/mm/pageattr.c @@ -46,7 +46,8 @@ static int change_memory_common(unsigned long addr, int numpages, struct page_change_data data; if (!IS_ALIGNED(addr, PAGE_SIZE)) { - addr &= PAGE_MASK; + start &= PAGE_MASK; + end = start + size; WARN_ON_ONCE(1); } -- 2.20.1