From ce91b8f79aed3f2825d60f990c3f1a9fe2594d1a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 21 Oct 2005 15:03:29 -0700 Subject: [PATCH] --- yaml --- r: 10057 b: refs/heads/master c: 25f407f0b668f5e4ebd5d13e1fb4306ba6427ead h: refs/heads/master i: 10055: b118b85adfc2409a5638e60b551cd3cbec14d1e2 v: v3 --- [refs] | 2 +- trunk/kernel/exit.c | 1 + trunk/kernel/posix-timers.c | 2 +- trunk/kernel/signal.c | 14 +------------- 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index 7905344350f8..8283516cc707 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9465bee863bc4c6cf1566c12d6f92a8133e3da5c +refs/heads/master: 25f407f0b668f5e4ebd5d13e1fb4306ba6427ead diff --git a/trunk/kernel/exit.c b/trunk/kernel/exit.c index 43077732619b..3b25b182d2be 100644 --- a/trunk/kernel/exit.c +++ b/trunk/kernel/exit.c @@ -843,6 +843,7 @@ fastcall NORET_TYPE void do_exit(long code) group_dead = atomic_dec_and_test(&tsk->signal->live); if (group_dead) { del_timer_sync(&tsk->signal->real_timer); + exit_itimers(tsk->signal); acct_process(code); } exit_mm(tsk); diff --git a/trunk/kernel/posix-timers.c b/trunk/kernel/posix-timers.c index b7b532acd9fc..dda3cda73c77 100644 --- a/trunk/kernel/posix-timers.c +++ b/trunk/kernel/posix-timers.c @@ -1157,7 +1157,7 @@ static inline void itimer_delete(struct k_itimer *timer) } /* - * This is called by __exit_signal, only when there are no more + * This is called by do_exit or de_thread, only when there are no more * references to the shared signal_struct. */ void exit_itimers(struct signal_struct *sig) diff --git a/trunk/kernel/signal.c b/trunk/kernel/signal.c index 50c992643771..f2b96b08fb44 100644 --- a/trunk/kernel/signal.c +++ b/trunk/kernel/signal.c @@ -397,20 +397,8 @@ void __exit_signal(struct task_struct *tsk) flush_sigqueue(&tsk->pending); if (sig) { /* - * We are cleaning up the signal_struct here. We delayed - * calling exit_itimers until after flush_sigqueue, just in - * case our thread-local pending queue contained a queued - * timer signal that would have been cleared in - * exit_itimers. When that called sigqueue_free, it would - * attempt to re-take the tasklist_lock and deadlock. This - * can never happen if we ensure that all queues the - * timer's signal might be queued on have been flushed - * first. The shared_pending queue, and our own pending - * queue are the only queues the timer could be on, since - * there are no other threads left in the group and timer - * signals are constrained to threads inside the group. + * We are cleaning up the signal_struct here. */ - exit_itimers(sig); exit_thread_group_keys(sig); kmem_cache_free(signal_cachep, sig); }