All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] sched: fix list traversal to use _rcu variant
@ 2008-09-22 17:06 Chris Friesen
  2008-09-22 17:43 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Friesen @ 2008-09-22 17:06 UTC (permalink / raw)
  To: a.p.zijlstra, mingo; +Cc: Linux kernel

From: Chris Friesen    <cfriesen@nortel.com>

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 <cfriesen@nortel.com>
Approval token "Nortel-02-July-2008-01"
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>

---

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index fb8994c..3c8f631 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1507,7 +1507,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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-22 17:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-22 17:06 [patch] sched: fix list traversal to use _rcu variant Chris Friesen
2008-09-22 17:43 ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.