diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-30 02:28:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-30 02:28:17 -0400 |
commit | 1508487e7f16d992ad23cabd3712563ff912f413 (patch) | |
tree | d8e341de10ec868c4f8d4129aa04eadd33f37ca9 | |
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>
-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); | |||
4042 | */ | 4042 | */ |
4043 | unsigned long long task_delta_exec(struct task_struct *p) | 4043 | unsigned long long task_delta_exec(struct task_struct *p) |
4044 | { | 4044 | { |
4045 | struct rq *rq; | ||
4046 | unsigned long flags; | 4045 | unsigned long flags; |
4046 | struct rq *rq; | ||
4047 | u64 ns = 0; | 4047 | u64 ns = 0; |
4048 | 4048 | ||
4049 | rq = task_rq_lock(p, &flags); | ||
4050 | |||
4049 | if (task_current(rq, p)) { | 4051 | if (task_current(rq, p)) { |
4050 | u64 delta_exec; | 4052 | u64 delta_exec; |
4051 | 4053 | ||
@@ -4055,6 +4057,8 @@ unsigned long long task_delta_exec(struct task_struct *p) | |||
4055 | ns = delta_exec; | 4057 | ns = delta_exec; |
4056 | } | 4058 | } |
4057 | 4059 | ||
4060 | task_rq_unlock(rq, &flags); | ||
4061 | |||
4058 | return ns; | 4062 | return ns; |
4059 | } | 4063 | } |
4060 | 4064 | ||