diff options
author | Paul Turner <pjt@google.com> | 2010-11-29 19:55:40 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-11-30 04:07:10 -0500 |
commit | 822bc180a7f7a7bc5fcaaea195f41b487cc8cae8 (patch) | |
tree | 875bc605db4996e5e008f73fde1daf27fd49a53c /kernel/sched.c | |
parent | b7a2b39d9b7703ccf068f549c8dc3465fc41d015 (diff) |
sched: Fix unregister_fair_sched_group()
In the flipping and flopping between calling
unregister_fair_sched_group() on a per-cpu versus per-group basis
we ended up in a bad state.
Remove from the list for the passed cpu as opposed to some
arbitrary index.
( This fixes explosions w/ autogroup as well as a group
creation/destruction stress test. )
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <20101130005740.080828123@google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 35a6373f1265..66ef5790d932 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -8085,7 +8085,6 @@ static inline void unregister_fair_sched_group(struct task_group *tg, int cpu) | |||
8085 | { | 8085 | { |
8086 | struct rq *rq = cpu_rq(cpu); | 8086 | struct rq *rq = cpu_rq(cpu); |
8087 | unsigned long flags; | 8087 | unsigned long flags; |
8088 | int i; | ||
8089 | 8088 | ||
8090 | /* | 8089 | /* |
8091 | * Only empty task groups can be destroyed; so we can speculatively | 8090 | * Only empty task groups can be destroyed; so we can speculatively |
@@ -8095,7 +8094,7 @@ static inline void unregister_fair_sched_group(struct task_group *tg, int cpu) | |||
8095 | return; | 8094 | return; |
8096 | 8095 | ||
8097 | raw_spin_lock_irqsave(&rq->lock, flags); | 8096 | raw_spin_lock_irqsave(&rq->lock, flags); |
8098 | list_del_leaf_cfs_rq(tg->cfs_rq[i]); | 8097 | list_del_leaf_cfs_rq(tg->cfs_rq[cpu]); |
8099 | raw_spin_unlock_irqrestore(&rq->lock, flags); | 8098 | raw_spin_unlock_irqrestore(&rq->lock, flags); |
8100 | } | 8099 | } |
8101 | #else /* !CONFG_FAIR_GROUP_SCHED */ | 8100 | #else /* !CONFG_FAIR_GROUP_SCHED */ |