summaryrefslogtreecommitdiffstats
path: root/kernel/arch/arm64/mm/pageattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/arm64/mm/pageattr.c')
-rw-r--r--kernel/arch/arm64/mm/pageattr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/arch/arm64/mm/pageattr.c b/kernel/arch/arm64/mm/pageattr.c
index e47ed1c5d..cf6240741 100644
--- a/kernel/arch/arm64/mm/pageattr.c
+++ b/kernel/arch/arm64/mm/pageattr.c
@@ -45,7 +45,7 @@ static int change_memory_common(unsigned long addr, int numpages,
int ret;
struct page_change_data data;
- if (!IS_ALIGNED(addr, PAGE_SIZE)) {
+ if (!PAGE_ALIGNED(addr)) {
start &= PAGE_MASK;
end = start + size;
WARN_ON_ONCE(1);
@@ -57,6 +57,9 @@ static int change_memory_common(unsigned long addr, int numpages,
if (end < MODULES_VADDR || end >= MODULES_END)
return -EINVAL;
+ if (!numpages)
+ return 0;
+
data.set_mask = set_mask;
data.clear_mask = clear_mask;