Revert "bug on kmem_cache_free with the wrong cache"
This reverts commit 8df273c856
.
This commit is contained in:
parent
2952f0d34d
commit
e2bbab2d22
1 changed files with 0 additions and 4 deletions
|
@ -510,14 +510,10 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
|
||||||
return s;
|
return s;
|
||||||
|
|
||||||
cachep = virt_to_cache(x);
|
cachep = virt_to_cache(x);
|
||||||
#ifdef CONFIG_BUG_ON_DATA_CORRUPTION
|
|
||||||
BUG_ON(cachep && cachep != s);
|
|
||||||
#else
|
|
||||||
if (WARN(cachep && cachep != s,
|
if (WARN(cachep && cachep != s,
|
||||||
"%s: Wrong slab cache. %s but object is from %s\n",
|
"%s: Wrong slab cache. %s but object is from %s\n",
|
||||||
__func__, s->name, cachep->name))
|
__func__, s->name, cachep->name))
|
||||||
print_tracking(cachep, x);
|
print_tracking(cachep, x);
|
||||||
#endif
|
|
||||||
return cachep;
|
return cachep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue