[PATCH 2/4] arm: let set_memory_xx(addr, 0) succeed.
From: mika.penttila
Date: Sat Jan 23 2016 - 10:07:37 EST
From: Mika Penttilà <mika.penttila@xxxxxxxxxxxx>
This makes set_memory_xx() consistent with x86.
Signed-off-by: Mika Penttilà mika.penttila@xxxxxxxxxxxx
---
arch/arm/mm/pageattr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/mm/pageattr.c b/arch/arm/mm/pageattr.c
index be7fe4b..9edf6b0 100644
--- a/arch/arm/mm/pageattr.c
+++ b/arch/arm/mm/pageattr.c
@@ -49,6 +49,9 @@ static int change_memory_common(unsigned long addr, int numpages,
WARN_ON_ONCE(1);
}
+ if (!numpages)
+ return 0;
+
if (start < MODULES_VADDR || start >= MODULES_END)
return -EINVAL;
--
1.9.1