aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mempool.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mempool.c')
-rw-r--r--mm/mempool.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/mempool.c b/mm/mempool.c
index 3e8f1fed0e1f..02d5ec3feabc 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -62,10 +62,9 @@ mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
62 mempool_free_t *free_fn, void *pool_data, int node_id) 62 mempool_free_t *free_fn, void *pool_data, int node_id)
63{ 63{
64 mempool_t *pool; 64 mempool_t *pool;
65 pool = kmalloc_node(sizeof(*pool), GFP_KERNEL, node_id); 65 pool = kmalloc_node(sizeof(*pool), GFP_KERNEL | __GFP_ZERO, node_id);
66 if (!pool) 66 if (!pool)
67 return NULL; 67 return NULL;
68 memset(pool, 0, sizeof(*pool));
69 pool->elements = kmalloc_node(min_nr * sizeof(void *), 68 pool->elements = kmalloc_node(min_nr * sizeof(void *),
70 GFP_KERNEL, node_id); 69 GFP_KERNEL, node_id);
71 if (!pool->elements) { 70 if (!pool->elements) {