On 7/14/26 12:30 AM, Suren Baghdasaryan wrote: > On Mon, Jul 13, 2026 at 7:29 AM Harry Yoo (Oracle) wrote: >> >> When kmalloc caches are aliased, multiple cache pointers reference >> the same kmem_cache. As a result, iterating over kmalloc indices and >> bootstrapping sheaves can bootstrap the same cache more than once and >> leak memory. >> >> Currently, this could happen when the architecture specifies >> minimum alignment for slab caches that is larger than >> ARCH_KMALLOC_MINALIGN. >> >> Bootstrap sheaves only when the cache does not have them already. >> Add a warning when bootstrap_cache_sheaves() is called for a cache >> that already has sheaves enabled. >> >> Cc: stable@vger.kernel.org >> Fixes: 913ffd3a1bf5 ("slab: handle kmalloc sheaves bootstrap") >> Signed-off-by: Harry Yoo (Oracle) > > nit: Don't know if we really need a warning... Hehe, at least the warning allowed me to confirm that this is not an oversight and the patch fixed it :) > I would just do an > early return from bootstrap_cache_sheaves() if cache_has_sheaves() is > true. But that's not critical. But yeah, no strong opinion on this. > Reviewed-by: Suren Baghdasaryan Thanks! -- Cheers, Harry / Hyeonggon