Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b9dca1e0fcb696716840a3bc8f20a6941b484dbf
Commit:     b9dca1e0fcb696716840a3bc8f20a6941b484dbf
Parent:     b1a8c172c318534b96d0f0f1aecdad3898118b98
Author:     Srivatsa Vaddagiri <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 16:55:11 2007 +0200
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 16:55:11 2007 +0200

    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 <[EMAIL PROTECTED]>
    Reported-by: Andy Whitcroft <[EMAIL PROTECTED]>
    Signed-off-by: Srivatsa Vaddagiri <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 kernel/sched.c      |    2 +-
 kernel/sched_fair.c |    6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 9754364..0ec9521 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1712,7 +1712,7 @@ void fastcall wake_up_new_task(struct task_struct *p, 
unsigned long clone_flags)
 
        p->prio = effective_prio(p);
 
-       if (!p->sched_class->task_new || !current->se.on_rq || !rq->cfs.curr) {
+       if (!p->sched_class->task_new || !current->se.on_rq) {
                activate_task(rq, p, 0);
        } else {
                /*
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index a17b785..166ed6d 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)
                swap(curr->vruntime, se->vruntime);
        }
 
-       update_stats_enqueue(cfs_rq, se);
-       check_spread(cfs_rq, se);
-       check_spread(cfs_rq, curr);
-       __enqueue_entity(cfs_rq, se);
-       account_entity_enqueue(cfs_rq, se);
        se->peer_preempt = 0;
+       enqueue_task_fair(rq, p, 0);
        resched_task(rq->curr);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to