1
0
Fork 0

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>
hifive-unleashed-5.1
Mika Penttilä 2016-02-22 17:56:52 +01:00 committed by Russell King
parent c7edd7f99c
commit f474c8c857
1 changed files with 3 additions and 0 deletions

View File

@ -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;