slab fixes for 6.6-rc6

-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEe7vIQRWZI0iWSE3xu+CwddJFiJoFAmUxOtMACgkQu+CwddJF
 iJqwmgf/UYBHiwWoGXOuLCDBvm2Z4GwQyGH347IVooDpY28/NoWqeGeYbllvqj9k
 2EhP5zWLT945nt4L2Si98hn0ikqZ4DyljrHv/zpQShqKII7Ddh3o3j5r60Cbhyql
 9HAhei2I2lhiVLQBuQ2MQxFYeXW38s1XRL9/OY6nph8tYC2GvafVei3a0YHiT5J3
 CwkWQs+TV8R5RSFVE52htPV2PWx2+ZI5apyEeu9yuXZr22RuRsAgZM27QjakNrGI
 bFdShWQwnWSf/MmtuEtqXwBw4dpvLyG9gqVaeMZUydrW7OotR9kLvnL2yhoMvNb6
 7bq+cJniwLj31uYRHgIALzzaVjA88Q==
 =hkq/
 -----END PGP SIGNATURE-----

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()
This commit is contained in:
Linus Torvalds 2023-10-19 10:53:31 -07:00
commit 54fb58aec4

View File

@ -895,10 +895,13 @@ void __init setup_kmalloc_cache_index_table(void)
static unsigned int __kmalloc_minalign(void)
{
unsigned int minalign = dma_get_cache_alignment();
if (IS_ENABLED(CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC) &&
is_swiotlb_allocated())
return ARCH_KMALLOC_MINALIGN;
return dma_get_cache_alignment();
minalign = ARCH_KMALLOC_MINALIGN;
return max(minalign, arch_slab_minalign());
}
void __init