From: Chris Friesen Date: Mon, 22 Sep 2008 17:06:09 +0000 (-0600) Subject: sched: fix list traversal to use _rcu variant X-Git-Tag: v2.6.28-rc1~725^2~2^2~13 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=caea8a03702c147e8ae90da0801e7ba8297b1d46;p=linux-2.6-omap-h63xx.git sched: fix list traversal to use _rcu variant load_balance_fair() calls rcu_read_lock() but then traverses the list using the regular list traversal routine. This patch converts the list traversal to use the _rcu version. Signed-off-by: Chris Friesen Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 7328383690f..3b89aa6594a 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -1521,7 +1521,7 @@ load_balance_fair(struct rq *this_rq, int this_cpu, struct rq *busiest, rcu_read_lock(); update_h_load(busiest_cpu); - list_for_each_entry(tg, &task_groups, list) { + list_for_each_entry_rcu(tg, &task_groups, list) { struct cfs_rq *busiest_cfs_rq = tg->cfs_rq[busiest_cpu]; unsigned long busiest_h_load = busiest_cfs_rq->h_load; unsigned long busiest_weight = busiest_cfs_rq->load.weight;