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

Commit 9f295664 authored by Dan Carpenter's avatar Dan Carpenter Committed by Tejun Heo
Browse files

percpu: off by one in BUG_ON()



The unit_map[] array has "nr_cpu_ids" number of elements.  It's
allocated a few lines earlier in the function.  So this test should be
>= instead of >.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent cac7f242
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1591,7 +1591,7 @@ int __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai,
			if (cpu == NR_CPUS)
				continue;

			PCPU_SETUP_BUG_ON(cpu > nr_cpu_ids);
			PCPU_SETUP_BUG_ON(cpu >= nr_cpu_ids);
			PCPU_SETUP_BUG_ON(!cpu_possible(cpu));
			PCPU_SETUP_BUG_ON(unit_map[cpu] != UINT_MAX);