Commit 857b64a5 authored by Roland McGrath's avatar Roland McGrath Committed by Linus Torvalds

[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: default avatarRoland McGrath <roland@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2c3871a8
...@@ -753,15 +753,8 @@ static void exit_notify(struct task_struct *tsk) ...@@ -753,15 +753,8 @@ static void exit_notify(struct task_struct *tsk)
state = EXIT_DEAD; state = EXIT_DEAD;
tsk->exit_state = state; 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_virt_value = cputime_zero;
tsk->it_prof_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); write_unlock_irq(&tasklist_lock);
...@@ -804,6 +797,14 @@ fastcall NORET_TYPE void do_exit(long code) ...@@ -804,6 +797,14 @@ fastcall NORET_TYPE void do_exit(long code)
tsk->flags |= PF_EXITING; tsk->flags |= PF_EXITING;
del_timer_sync(&tsk->real_timer); 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())) if (unlikely(in_atomic()))
printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n", printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
current->comm, current->pid, current->comm, current->pid,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment