summaryrefslogtreecommitdiffstats
path: root/mm/mempool.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-09-22 02:02:56 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-22 16:17:35 +0200
commitbba78819548a59a52e60f0b259997bbd011164ae (patch)
tree1d788069848ba86906269d8eb8b1b13119260e5a /mm/mempool.c
parentmd: avoid use of broken kzalloc mempool (diff)
downloadlinux-bba78819548a59a52e60f0b259997bbd011164ae.tar.xz
linux-bba78819548a59a52e60f0b259997bbd011164ae.zip
mm: remove broken 'kzalloc' mempool
The kzalloc mempool zeros items when they are initially allocated, but does not rezero used items that are returned to the pool. Consequently mempool_alloc()s may return non-zeroed memory. Since there are/were only two in-tree users for mempool_create_kzalloc_pool(), and 'fixing' this in a way that will re-zero used (but not new) items before first use is non-trivial, just remove it. Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mempool.c')
-rw-r--r--mm/mempool.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/mm/mempool.c b/mm/mempool.c
index 32e75d400503..1a3bc3d4d554 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -308,13 +308,6 @@ void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data)
}
EXPORT_SYMBOL(mempool_kmalloc);
-void *mempool_kzalloc(gfp_t gfp_mask, void *pool_data)
-{
- size_t size = (size_t)pool_data;
- return kzalloc(size, gfp_mask);
-}
-EXPORT_SYMBOL(mempool_kzalloc);
-
void mempool_kfree(void *element, void *pool_data)
{
kfree(element);