[patch] BFS 421: fix resched_closest_idle

From: Hillf Danton
Date: Wed Jun 06 2012 - 09:17:46 EST


Frankly it is not fix, but operating cpu_idle_map is not sane if idle_cpus is
not checked first, according to its define.

Btw, the helper will be removed soon as we no longer maintain the sticky bit.


--- a/kernel/sched/bfs.c Wed Jun 6 20:04:50 2012
+++ b/kernel/sched/bfs.c Wed Jun 6 20:06:38 2012
@@ -1055,6 +1055,8 @@ resched_closest_idle(struct rq *rq, int
{
cpumask_t tmpmask;

+ if (!grq.idle_cpus)
+ return;
cpus_and(tmpmask, p->cpus_allowed, grq.cpu_idle_map);
cpu_clear(cpu, tmpmask);
if (cpus_empty(tmpmask))
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/