Commit b4da1840 authored by Laura Abbott's avatar Laura Abbott Committed by Catalin Marinas

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: default avatarZi Shen Lim <zlim.lnx@gmail.com>
Reviewed-by: default avatarZi Shen Lim <zlim.lnx@gmail.com>
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 60ef0494
...@@ -46,7 +46,8 @@ static int change_memory_common(unsigned long addr, int numpages, ...@@ -46,7 +46,8 @@ static int change_memory_common(unsigned long addr, int numpages,
struct page_change_data data; struct page_change_data data;
if (!IS_ALIGNED(addr, PAGE_SIZE)) { if (!IS_ALIGNED(addr, PAGE_SIZE)) {
addr &= PAGE_MASK; start &= PAGE_MASK;
end = start + size;
WARN_ON_ONCE(1); WARN_ON_ONCE(1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment