Re: [PATCH v2] mm/slab: sample slab_state once in kmem_cache_destroy()

From: Harry Yoo (Meta)

Date: Wed Oct 14 2026 - 15:54:26 EST


On Wed, 14 Oct 2026 17:08:43 +0200, Imre Kaloz wrote:
> kmem_cache_release() tests slab_state >= FULL after kmem_cache_destroy()
> has dropped slab_mutex and unlinked the cache, and for a
> SLAB_TYPESAFE_BY_RCU cache after rcu_barrier(). If slab_late_init() runs
> before that test it sets slab_state to FULL but skips the unlinked cache,
> which never got a sysfs entry, so sysfs_slab_release() calls kobject_put()
> on a kobject that was never initialized:
>
> [...]

Applied to mm/slab.git slab/for-next, thanks!

[1/1] mm/slab: sample slab_state once in kmem_cache_destroy()
commit: 6d9bc3d860e64e2c5dbfd7531954df9ea8c388aa

--
Cheers,
Harry / Hyeonggon