aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/mm/slub.c b/mm/slub.c
index fd8f8655efc6..9162c99fb307 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3326,43 +3326,6 @@ size_t ksize(const void *object)
3326} 3326}
3327EXPORT_SYMBOL(ksize); 3327EXPORT_SYMBOL(ksize);
3328 3328
3329#ifdef CONFIG_SLUB_DEBUG
3330bool verify_mem_not_deleted(const void *x)
3331{
3332 struct page *page;
3333 void *object = (void *)x;
3334 unsigned long flags;
3335 bool rv;
3336
3337 if (unlikely(ZERO_OR_NULL_PTR(x)))
3338 return false;
3339
3340 local_irq_save(flags);
3341
3342 page = virt_to_head_page(x);
3343 if (unlikely(!PageSlab(page))) {
3344 /* maybe it was from stack? */
3345 rv = true;
3346 goto out_unlock;
3347 }
3348
3349 slab_lock(page);
3350 if (on_freelist(page->slab_cache, page, object)) {
3351 object_err(page->slab_cache, page, object,
3352 "Object is on free-list");
3353 rv = false;
3354 } else {
3355 rv = true;
3356 }
3357 slab_unlock(page);
3358
3359out_unlock:
3360 local_irq_restore(flags);
3361 return rv;
3362}
3363EXPORT_SYMBOL(verify_mem_not_deleted);
3364#endif
3365
3366void kfree(const void *x) 3329void kfree(const void *x)
3367{ 3330{
3368 struct page *page; 3331 struct page *page;