mirror of
https://github.com/torvalds/linux.git
synced 2026-12-03 20:06:35 +00:00
Since commit4c39529663("slab: Warn on duplicate cache names when DEBUG_VM=y"), slab complains about duplicate cache names. Hence this patch. The approach is as follows: - Maintain an xarray with the slab size as index and a reference count and a kmem_cache pointer as contents. Use srpt-${slab_size} as kmem cache name. - Use 512-byte alignment for all slabs instead of only for some of the slabs. - Increment the reference count instead of calling kmem_cache_create(). - Decrement the reference count instead of calling kmem_cache_destroy(). Fixes:5dabcd0456("RDMA/srpt: Add support for immediate data") Link: https://patch.msgid.link/r/[email protected] Reported-by: Shinichiro Kawasaki <[email protected]> Closes: https://lore.kernel.org/linux-block/xpe6bea7rakpyoyfvspvin2dsozjmjtjktpph7rep3h25tv7fb@ooz4cu5z6bq6/ Suggested-by: Jason Gunthorpe <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Tested-by: Shin'ichiro Kawasaki <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>