aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2017-03-25 02:44:05 -0400
committerMoyster <oysterized@gmail.com>2018-05-16 13:24:56 +0200
commit94c7a986154d87553892ce61d7d8863507dca84c (patch)
tree1b2e586847946347e7d8c6badfd6e8fec64b9bcd /mm
parent8dee796c6a523ca052d558df176e0fd27f7e07fd (diff)
panic on kmem_cache_free with the wrong cache
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.h6
1 files changed, 2 insertions, 4 deletions
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