Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm, mempool: disallow mempools based on slab caches with constructors
All occurrences of mempools based on slab caches with object constructors have been removed from the tree, so disallow creating them. We can only dereference mem->ctor in mm/mempool.c without including mm/slab.h in include/linux/mempool.h. So simply note the restriction, just like the comment restricting usage of __GFP_ZERO, and warn on kernels with CONFIG_DEBUG_VM() if such a mempool is allocated from. We don't want to incur this check on every element allocation, so use VM_BUG_ON(). Signed-off-by: David Rientjes <[email protected]> Cc: Dave Kleikamp <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Sebastian Ott <[email protected]> Cc: Mikulas Patocka <[email protected]> Cc: Catalin Marinas <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information