]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - mm/percpu-stats.c
treewide: Use array_size() in vmalloc()
[linux.git] / mm / percpu-stats.c
index 063ff60ecd901edd979d301e462a94fb51374a20..b5fdd43b60c9088de4779b2c3c02e0a08caf81ae 100644 (file)
@@ -144,7 +144,7 @@ static int percpu_stats_show(struct seq_file *m, void *v)
        spin_unlock_irq(&pcpu_lock);
 
        /* there can be at most this many free and allocated fragments */
-       buffer = vmalloc((2 * max_nr_alloc + 1) * sizeof(int));
+       buffer = vmalloc(array_size(sizeof(int), (2 * max_nr_alloc + 1)));
        if (!buffer)
                return -ENOMEM;