summaryrefslogtreecommitdiff
path: root/include/linux/vmalloc.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-11-16 18:06:43 -0500
committerKent Overstreet <kent.overstreet@gmail.com>2020-11-16 18:23:47 -0500
commit3420d86959401e5884627efdf3c2361e50b05eaa (patch)
tree3f6f8ade165a6f955a239a0edffdf4f255646c09 /include/linux/vmalloc.h
parent4915b450e2a1d31c96d27df53147c614bc69c807 (diff)
Round up aligned_alloc() allocations
this fixes an address sanitizer splat Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'include/linux/vmalloc.h')
-rw-r--r--include/linux/vmalloc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index efcc1912..c674d9a2 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -16,6 +16,8 @@ static inline void *__vmalloc(unsigned long size, gfp_t gfp_mask)
{
void *p;
+ size = round_up(size, PAGE_SIZE);
+
run_shrinkers();
p = aligned_alloc(PAGE_SIZE, size);