Skip to content

Commit f474c8c

Browse files
Mika PenttiläRussell King
authored andcommitted
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>
1 parent c7edd7f commit f474c8c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/arm/mm/pageattr.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ static int change_memory_common(unsigned long addr, int numpages,
4949
WARN_ON_ONCE(1);
5050
}
5151

52+
if (!numpages)
53+
return 0;
54+
5255
if (start < MODULES_VADDR || start >= MODULES_END)
5356
return -EINVAL;
5457

0 commit comments

Comments
 (0)