Re: [PATCH] mm: Add additional consistency check
From: Christoph Lameter
Date: Mon Apr 03 2017 - 10:12:12 EST
On Mon, 3 Apr 2017, Michael Ellerman wrote:
> At least in slab.c it seems that would allow you to "free" an object
> from one kmem_cache onto the array_cache of another kmem_cache, which
> seems fishy. But maybe there's a check somewhere I'm missing?
kfree can be used to free any object from any slab cache.
kmem_cache_free() checks if the object belongs to the cache given.