summaryrefslogtreecommitdiff
path: root/include/linux/decompress
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-08-07 19:27:15 +0300
committerBorislav Petkov (AMD) <bp@alien8.de>2023-08-07 21:55:27 +0300
commit8217ad0a435ff06d651d7298ea8ae8d72388179e (patch)
treef13252203fb671510f20a2b63cc61f824c59eab9 /include/linux/decompress
parent11078876b7a6a1b7226344fecab968945c806832 (diff)
downloadlinux-8217ad0a435ff06d651d7298ea8ae8d72388179e.tar.xz
decompress: Use 8 byte alignment
The ZSTD decompressor requires malloc() allocations to be 8 byte aligned, so ensure that this the case. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20230807162720.545787-19-ardb@kernel.org
Diffstat (limited to 'include/linux/decompress')
-rw-r--r--include/linux/decompress/mm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h
index 9192986b1a73..ac862422df15 100644
--- a/include/linux/decompress/mm.h
+++ b/include/linux/decompress/mm.h
@@ -48,7 +48,7 @@ MALLOC_VISIBLE void *malloc(int size)
if (!malloc_ptr)
malloc_ptr = free_mem_ptr;
- malloc_ptr = (malloc_ptr + 3) & ~3; /* Align */
+ malloc_ptr = (malloc_ptr + 7) & ~7; /* Align */
p = (void *)malloc_ptr;
malloc_ptr += size;