diff options
author | Laura Abbott <lauraa@codeaurora.org> | 2014-09-11 22:10:32 (GMT) |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2014-09-12 15:34:50 (GMT) |
commit | b4da1840dc4d92f05419bd2abbde82131d4301d9 (patch) | |
tree | 8428cde69ad4894f8b89805bdc29a20bef2ee42b /arch/arm64/mm/pageattr.c | |
parent | 60ef0494f197d4705b17132ee7d496283b5604b3 (diff) | |
download | linux-b4da1840dc4d92f05419bd2abbde82131d4301d9.tar.xz |
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 <zlim.lnx@gmail.com>
Reviewed-by: Zi Shen Lim <zlim.lnx@gmail.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/mm/pageattr.c')
-rw-r--r-- | arch/arm64/mm/pageattr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/mm/pageattr.c b/arch/arm64/mm/pageattr.c index 75e744e..bb0ea94 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); } |