Merge tag 'nds32-for-linus-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / mm / percpu-stats.c
index 063ff60..b5fdd43 100644 (file)
@@ -144,7 +144,7 @@ alloc_buffer:
        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;