Skip to content

Commit

Permalink
ARM: 8544/1: set_memory_xx fixes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mika Penttilä authored and Russell King committed Mar 4, 2016
1 parent c7edd7f commit f474c8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f474c8c

Please sign in to comment.