Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6bca67f9 authored by Mike Travis's avatar Mike Travis Committed by Ingo Molnar
Browse files

NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/mcheck/mce_64.c



  * nr_cpu_ids should be used to allocate arrays based on the number of
    cpu's present.

Signed-off-by: default avatarMike Travis <travis@sgi.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 06f8d00e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -580,7 +580,7 @@ static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize,
	char __user *buf = ubuf;
	int i, err;

	cpu_tsc = kmalloc(NR_CPUS * sizeof(long), GFP_KERNEL);
	cpu_tsc = kmalloc(nr_cpu_ids * sizeof(long), GFP_KERNEL);
	if (!cpu_tsc)
		return -ENOMEM;