From 94c7a986154d87553892ce61d7d8863507dca84c Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 25 Mar 2017 02:44:05 -0400 Subject: panic on kmem_cache_free with the wrong cache --- mm/slab.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'mm/slab.h') diff --git a/mm/slab.h b/mm/slab.h index cc47f1e4a..ae04af778 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -215,10 +215,8 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x) if (slab_equal_or_root(cachep, s)) return cachep; - pr_err("%s: Wrong slab cache. %s but object is from %s\n", - __func__, cachep->name, s->name); - WARN_ON_ONCE(1); - return s; + panic("%s: Wrong slab cache. %s but object is from %s\n", + __func__, cachep->name, s->name); } #endif -- cgit v1.2.3