Skip to content

Commit

Permalink
arm64: pageattr: Correctly adjust unaligned start addresses
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Zi Shen Lim <[email protected]>
Signed-off-by: Laura Abbott <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
  • Loading branch information
labbott authored and ctmarinas committed Sep 12, 2014
1 parent 60ef049 commit b4da184
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm64/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit b4da184

Please sign in to comment.