Commit 54fb58ae authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'slab-fixes-for-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab

Pull slab fix from Vlastimil Babka:

 - stable fix to prevent kernel warnings with KASAN_HW_TAGS on arm64
   due to improperly resolved kmalloc alignment restrictions (Catalin
   Marinas)

* tag 'slab-fixes-for-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab:
  mm: slab: Do not create kmalloc caches smaller than arch_slab_minalign()
parents 189b7562 c15cdea5
...@@ -895,10 +895,13 @@ void __init setup_kmalloc_cache_index_table(void) ...@@ -895,10 +895,13 @@ void __init setup_kmalloc_cache_index_table(void)
static unsigned int __kmalloc_minalign(void) static unsigned int __kmalloc_minalign(void)
{ {
unsigned int minalign = dma_get_cache_alignment();
if (IS_ENABLED(CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC) && if (IS_ENABLED(CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC) &&
is_swiotlb_allocated()) is_swiotlb_allocated())
return ARCH_KMALLOC_MINALIGN; minalign = ARCH_KMALLOC_MINALIGN;
return dma_get_cache_alignment();
return max(minalign, arch_slab_minalign());
} }
void __init void __init
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment