Commit 1ba586de authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Linus Torvalds
Browse files

mm/slab_common.c: remove test if cache name is accessible

Since commit db265eca ("mm/sl[aou]b: Move duping of slab name to
slab_common.c"), the kernel always duplicates the slab cache name when
creating a slab cache, so the test if the slab name is accessible is


Signed-off-by: default avatarMikulas Patocka <>
Acked-by: default avatarChristoph Lameter <>
Cc: Pekka Enberg <>
Cc: David Rientjes <>
Cc: Joonsoo Kim <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 613a5eb5
......@@ -84,31 +84,12 @@ EXPORT_SYMBOL(kmem_cache_size);
static int kmem_cache_sanity_check(const char *name, unsigned int size)
struct kmem_cache *s = NULL;
if (!name || in_interrupt() || size < sizeof(void *) ||
pr_err("kmem_cache_create(%s) integrity check failed\n", name);
return -EINVAL;
list_for_each_entry(s, &slab_caches, list) {
char tmp;
int res;
* This happens when the module gets unloaded and doesn't
* destroy its slab cache and no-one else reuses the vmalloc
* area of the module. Print a warning.
res = probe_kernel_address(s->name, tmp);
if (res) {
pr_err("Slab cache with size %u has lost its name\n",
WARN_ON(strchr(name, ' ')); /* It confuses parsers */
return 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment