mm, slab: move kfence_shutdown_cache() outside slab_mutex
authorVlastimil Babka <vbabka@suse.cz>
Wed, 7 Aug 2024 10:31:16 +0000 (12:31 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Tue, 27 Aug 2024 12:12:51 +0000 (14:12 +0200)
commitf77d0cda4a8ebd070bfa1ef9a153c470ea3601ce
treea8631a29e48c7e612fa30e54dd8b53dec32d5f09
parent4ec10268ed98a3d568a39861e7b7d0a0fa7cbe60
mm, slab: move kfence_shutdown_cache() outside slab_mutex

kfence_shutdown_cache() is called under slab_mutex when the cache is
destroyed synchronously, and outside slab_mutex during the delayed
destruction of SLAB_TYPESAFE_BY_RCU caches.

It seems it should always be safe to call it outside of slab_mutex so we
can just move the call to kmem_cache_release(), which is called outside.

Reviewed-by: Jann Horn <jannh@google.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slab_common.c