From 3420d86959401e5884627efdf3c2361e50b05eaa Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Mon, 16 Nov 2020 18:06:43 -0500 Subject: [PATCH] Round up aligned_alloc() allocations this fixes an address sanitizer splat Signed-off-by: Kent Overstreet --- include/linux/vmalloc.h | 2 ++ 1 file changed, 2 insertions(+) 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);