diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 091a07f6d925..adde450ddf5e 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -5140,7 +5140,7 @@ static int vmalloc_info_show(struct seq_file *m, void *p) unsigned int *counters; if (IS_ENABLED(CONFIG_NUMA)) - counters = kmalloc(nr_node_ids * sizeof(unsigned int), GFP_KERNEL); + counters = kmalloc_array(nr_node_ids, sizeof(unsigned int), GFP_KERNEL); for_each_vmap_node(vn) { spin_lock(&vn->busy.lock);