sched: hmp: fix out-of-range CPU possible
authorChris Redpath <chris.redpath@arm.com>
Fri, 6 Jun 2014 14:18:59 +0000 (15:18 +0100)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Mon, 28 Jul 2014 12:44:44 +0000 (13:44 +0100)
commit0d809ec7d6799cbd70324db8fe5069d3b46a594b
tree5c47464f583379af8bbe5dd5d2b19bb21856d972
parentb65ebb7573e74ec98ca5cfc0bf0850f927d43d1f
sched: hmp: fix out-of-range CPU possible

If someone hotplugs all the little CPUs while another CPU is handling
a wakeup, we can potentially return new_cpu == NR_CPUS from
hmp_select_slower_cpu (which is called internally by
hmp_best_little_cpu as well). We will use this to deref the
per_cpu rq array in hmp_next_down_delay which can go boom.

Signed-off-by: Chris Redpath <chris.redpath@arm.com>
kernel/sched/fair.c