aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorSrivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>2007-10-17 10:55:11 -0400
committerIngo Molnar <mingo@elte.hu>2007-10-17 10:55:11 -0400
commitb9dca1e0fcb696716840a3bc8f20a6941b484dbf (patch)
tree1fb2198b192b35382756e288ba33df6f37fcf6d4 /kernel/sched_fair.c
parentb1a8c172c318534b96d0f0f1aecdad3898118b98 (diff)
sched: fix new task startup crash
Child task may be added on a different cpu that the one on which parent is running. In which case, task_new_fair() should check whether the new born task's parent entity should be added as well on the cfs_rq. Patch below fixes the problem in task_new_fair. This could fix the put_prev_task_fair() crashes reported. Reported-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Reported-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index a17b785d7000..166ed6db600b 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1031,12 +1031,8 @@ static void task_new_fair(struct rq *rq, struct task_struct *p)
1031 swap(curr->vruntime, se->vruntime); 1031 swap(curr->vruntime, se->vruntime);
1032 } 1032 }
1033 1033
1034 update_stats_enqueue(cfs_rq, se);
1035 check_spread(cfs_rq, se);
1036 check_spread(cfs_rq, curr);
1037 __enqueue_entity(cfs_rq, se);
1038 account_entity_enqueue(cfs_rq, se);
1039 se->peer_preempt = 0; 1034 se->peer_preempt = 0;
1035 enqueue_task_fair(rq, p, 0);
1040 resched_task(rq->curr); 1036 resched_task(rq->curr);
1041} 1037}
1042 1038