diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-11-16 18:06:43 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2020-11-16 18:23:47 -0500 |
commit | 3420d86959401e5884627efdf3c2361e50b05eaa (patch) | |
tree | 3f6f8ade165a6f955a239a0edffdf4f255646c09 /include/linux/vmalloc.h | |
parent | 4915b450e2a1d31c96d27df53147c614bc69c807 (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.h | 2 |
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); |