Skip to content

Commit

Permalink
timers: fix itimer/many thread hang, fix
Browse files Browse the repository at this point in the history
fix bogus rq dereference: v3 removed the locking but also removed the rq
initialization.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Molnar committed Sep 30, 2008
1 parent 7086efe commit 1508487
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kernel/sched.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 1508487

Please sign in to comment.