summaryrefslogtreecommitdiff
path: root/mm/execmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/execmem.c')
-rw-r--r--mm/execmem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/execmem.c b/mm/execmem.c
index 6f7a2653b280..9720ac2dfa41 100644
--- a/mm/execmem.c
+++ b/mm/execmem.c
@@ -411,6 +411,8 @@ void *execmem_alloc(enum execmem_type type, size_t size)
pgprot_t pgprot = range->pgprot;
void *p;
+ size = PAGE_ALIGN(size);
+
if (use_cache)
p = execmem_cache_alloc(range, size);
else