diff options
author | Mika Penttilä <mika.penttila@nextfour.com> | 2016-02-22 17:56:52 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2016-03-05 00:32:45 +0100 |
commit | f474c8c857d996f34c39f66bbed23faaa739fad6 (patch) | |
tree | 0a0ae7bb3a9a7c405d6bba7cca7b75dabe5ea1fc /arch/arm | |
parent | ARM: 8534/1: virt: fix hyp-stub build for pre-ARMv7 CPUs (diff) | |
download | linux-f474c8c857d996f34c39f66bbed23faaa739fad6.tar.xz linux-f474c8c857d996f34c39f66bbed23faaa739fad6.zip |
ARM: 8544/1: set_memory_xx fixes
Allow zero size updates. This makes set_memory_xx() consistent with x86, s390 and arm64 and makes apply_to_page_range() not to BUG() when loading modules.
Signed-off-by: Mika Penttilä mika.penttila@nextfour.com
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to '')
-rw-r--r-- | arch/arm/mm/pageattr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mm/pageattr.c b/arch/arm/mm/pageattr.c index cf30daff8932..d19b1ad29b07 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; |