diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-30 08:28:17 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-30 08:28:17 +0200 |
commit | 1508487e7f16d992ad23cabd3712563ff912f413 (patch) | |
tree | d8e341de10ec868c4f8d4129aa04eadd33f37ca9 /kernel/sched.c | |
parent | 7086efe1c1536f6bc160e7d60a9bfd645b91f279 (diff) |
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 <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 29a3152c45db..ebb03def564b 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; } |