From: Ingo Molnar Signed-off-by: Andrew Morton --- 25-akpm/kernel/fork.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff -puN kernel/fork.c~kernelthread-idle-fix kernel/fork.c --- 25/kernel/fork.c~kernelthread-idle-fix 2004-07-11 21:44:47.960193520 -0700 +++ 25-akpm/kernel/fork.c 2004-07-11 21:44:47.965192760 -0700 @@ -1215,11 +1215,13 @@ long do_fork(unsigned long clone_flags, set_tsk_thread_flag(p, TIF_SIGPENDING); } - if (!(clone_flags & CLONE_STOPPED)) - wake_up_new_task(p, clone_flags); - else - p->state = TASK_STOPPED; - ++total_forks; + if (likely(!(clone_flags & CLONE_IDLETASK))) { + if (!(clone_flags & CLONE_STOPPED)) + wake_up_new_task(p, clone_flags); + else + p->state = TASK_STOPPED; + ++total_forks; + } if (unlikely (trace)) { current->ptrace_message = pid; _