From: Ingo Molnar Date: Tue, 30 Sep 2008 06:28:17 +0000 (+0200) Subject: timers: fix itimer/many thread hang, fix X-Git-Tag: v2.6.28-rc1~82^2^5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1508487e7f16d992ad23cabd3712563ff912f413;p=linux-2.6-omap-h63xx.git timers: fix itimer/many thread hang, fix fix bogus rq dereference: v3 removed the locking but also removed the rq initialization. Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched.c b/kernel/sched.c index 29a3152c45d..ebb03def564 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -4042,10 +4042,12 @@ EXPORT_PER_CPU_SYMBOL(kstat); */ unsigned long long task_delta_exec(struct task_struct *p) { - struct rq *rq; unsigned long flags; + struct rq *rq; u64 ns = 0; + rq = task_rq_lock(p, &flags); + if (task_current(rq, p)) { u64 delta_exec; @@ -4055,6 +4057,8 @@ unsigned long long task_delta_exec(struct task_struct *p) ns = delta_exec; } + task_rq_unlock(rq, &flags); + return ns; }