From e2bbab2d226630c3a0f0fbbab7cf7fb4df1b51eb Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Fri, 13 Dec 2024 19:44:18 +0100 Subject: [PATCH] Revert "bug on kmem_cache_free with the wrong cache" This reverts commit 8df273c8566412f09860dd16a4fe6fd2bf4c1a3d. --- mm/slab.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/slab.h b/mm/slab.h index ad457ec12..32ccbb32a 100755 --- a/mm/slab.h +++ b/mm/slab.h @@ -510,14 +510,10 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x) return s; cachep = virt_to_cache(x); -#ifdef CONFIG_BUG_ON_DATA_CORRUPTION - BUG_ON(cachep && cachep != s); -#else if (WARN(cachep && cachep != s, "%s: Wrong slab cache. %s but object is from %s\n", __func__, s->name, cachep->name)) print_tracking(cachep, x); -#endif return cachep; }