summaryrefslogtreecommitdiffstats
path: root/mm/slab_common.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2018-04-05 16:21:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-05 21:36:24 -0700
commit1ba586de22909f48db78682ee791e0213aba73ae (patch)
tree93eac2564a68dc3ce677c889fbb1f605eb9ff98a /mm/slab_common.c
parent613a5eb5677923fdaecfa582738c7bcf80abe186 (diff)
downloadlinux-0-day-1ba586de22909f48db78682ee791e0213aba73ae.tar.gz
linux-0-day-1ba586de22909f48db78682ee791e0213aba73ae.tar.xz
mm/slab_common.c: remove test if cache name is accessible
Since commit db265eca7700 ("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 useless. Link: http://lkml.kernel.org/r/alpine.LRH.2.02.1803231133310.22626@file01.intranet.prod.int.rdu2.redhat.com Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Acked-by: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r--mm/slab_common.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 4a4bd71ab7284..2e682a4c88776 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -84,31 +84,12 @@ EXPORT_SYMBOL(kmem_cache_size);
#ifdef CONFIG_DEBUG_VM
static int kmem_cache_sanity_check(const char *name, unsigned int size)
{
- struct kmem_cache *s = NULL;
-
if (!name || in_interrupt() || size < sizeof(void *) ||
size > KMALLOC_MAX_SIZE) {
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",
- s->object_size);
- continue;
- }
- }
-
WARN_ON(strchr(name, ' ')); /* It confuses parsers */
return 0;
}