From: Ingo Molnar Date: Wed, 8 Mar 2006 05:55:27 +0000 (-0800) Subject: [PATCH] idle threads should have a sane ->timestamp value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=81c29a857d3c8d6ea9c4f20d196c36bf0a07c615;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [PATCH] idle threads should have a sane ->timestamp value Idle threads should have a sane ->timestamp value, to avoid init kernel thread(s) from inheriting it and causing miscalculations in try_to_wake_up(). Reported-by: Mike Galbraith . Signed-off-by: Ingo Molnar Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/sched.c b/kernel/sched.c index 3454bb869fd0..e82c99f1db64 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -4335,6 +4335,7 @@ void __devinit init_idle(task_t *idle, int cpu) runqueue_t *rq = cpu_rq(cpu); unsigned long flags; + idle->timestamp = sched_clock(); idle->sleep_avg = 0; idle->array = NULL; idle->prio = MAX_PRIO;