diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2017-03-25 02:44:05 -0400 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2018-05-16 13:24:56 +0200 |
| commit | 94c7a986154d87553892ce61d7d8863507dca84c (patch) | |
| tree | 1b2e586847946347e7d8c6badfd6e8fec64b9bcd /mm | |
| parent | 8dee796c6a523ca052d558df176e0fd27f7e07fd (diff) | |
panic on kmem_cache_free with the wrong cache
Diffstat (limited to 'mm')
| -rw-r--r-- | mm/slab.h | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 |
