// SPDX-License-Identifier: GPL-2.0/* * Slab allocator functions that are independent of the allocator strategy * * (C) 2012 Christoph Lameter <cl@linux.com> */#include<linux/slab.h>#include<linux/mm.h>#include<linux/poison.h>#include<linux/interrupt.h>#include<linux/memory.h>#include<linux/cache.h>#include<linux/compiler.h>#include<linux/kfence.h>#include<linux/module.h>#include<linux/cpu.h>#include<linux/uaccess.h>#include<linux/seq_file.h>#include<linux/dma-mapping.h>#include<linux/swiotlb.h>#include<linux/proc_fs.h>#include<linux/debugfs.h>#include<linux/kasan.h>#include<asm/cacheflush.h>#include<asm/tlbflush.h>#include<asm/page.h>#include<linux/memcontrol.h>#include<linux/stackdepot.h>#include"internal.h"#include"slab.h"#define CREATE_TRACE_POINTS#include<trace/events/kmem.h>enumslab_stateslab_state;LIST_HEAD(slab_caches);DEFINE_MUTEX(slab_mutex);structkmem_cache*kmem_cache;staticLIST_HEAD(slab_caches_to_rcu_destroy);staticvoidslab_caches_to_rcu_destroy_workfn(structwork_struct*work);staticDECLARE_WORK(slab_caches_to_rcu_destroy_work,