diff options
| author | Roland McGrath <roland@redhat.com> | 2005-03-07 18:16:57 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-07 18:16:57 -0800 |
| commit | 857b64a59ebac8c9e1d951039cc9fb6a078f8274 (patch) | |
| tree | 48aa61392de11b89a8f7cfec8ef106dd8f52ea01 /kernel | |
| parent | 2c3871a8f5244025fe9d846f76994251319e23e4 (diff) | |
[PATCH] PANIC in check_process_timers()
It was intended that such things would not be possible because getting into
that code in the first place should be ruled out while exiting. That
removes the requirement for any special case check in the common path.
But, it was done too late since it hadn't occurred to me that ->live going
zero itself created a problem.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/exit.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 7605308b580d..fbe293b10a47 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -753,15 +753,8 @@ static void exit_notify(struct task_struct *tsk) state = EXIT_DEAD; tsk->exit_state = state; - /* - * Clear these here so that update_process_times() won't try to deliver - * itimer, profile or rlimit signals to this task while it is in late exit. - */ tsk->it_virt_value = cputime_zero; tsk->it_prof_value = cputime_zero; - tsk->it_virt_expires = cputime_zero; - tsk->it_prof_expires = cputime_zero; - tsk->it_sched_expires = 0; write_unlock_irq(&tasklist_lock); @@ -804,6 +797,14 @@ fastcall NORET_TYPE void do_exit(long code) tsk->flags |= PF_EXITING; del_timer_sync(&tsk->real_timer); + /* + * Make sure we don't try to process any timer firings + * while we are already exiting. + */ + tsk->it_virt_expires = cputime_zero; + tsk->it_prof_expires = cputime_zero; + tsk->it_sched_expires = 0; + if (unlikely(in_atomic())) printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n", current->comm, current->pid, |
