summaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-02-08 04:19:19 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 09:22:29 -0800
commitfea9d175545b38cb3e84569400419eb81bc90fa3 (patch)
tree0d43fe9ed2ea6104ee8b15a3eb8da081dd08fd35 /fs/exec.c
parent46f382d2b69d2221086b823f0dbc8f32c027cac2 (diff)
downloadblackbird-op-linux-fea9d175545b38cb3e84569400419eb81bc90fa3.tar.gz
blackbird-op-linux-fea9d175545b38cb3e84569400419eb81bc90fa3.zip
ITIMER_REAL: convert to use struct pid
signal_struct->tsk points to the ->group_leader and thus we have the nasty code in de_thread() which has to change it and restart ->real_timer if the leader is changed. Use "struct pid *leader_pid" instead. This also allows us to kill now unneeded send_group_sig_info(). Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Davide Libenzi <davidel@xmailserver.org> Cc: Pavel Emelyanov <xemul@openvz.org> Acked-by: Roland McGrath <roland@redhat.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/fs/exec.c b/fs/exec.c
index be923e4bc389..927a7c5ef4af 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -782,26 +782,8 @@ static int de_thread(struct task_struct *tsk)
zap_other_threads(tsk);
read_unlock(&tasklist_lock);
- /*
- * Account for the thread group leader hanging around:
- */
- count = 1;
- if (!thread_group_leader(tsk)) {
- count = 2;
- /*
- * The SIGALRM timer survives the exec, but needs to point
- * at us as the new group leader now. We have a race with
- * a timer firing now getting the old leader, so we need to
- * synchronize with any firing (by calling del_timer_sync)
- * before we can safely let the old group leader die.
- */
- sig->tsk = tsk;
- spin_unlock_irq(lock);
- if (hrtimer_cancel(&sig->real_timer))
- hrtimer_restart(&sig->real_timer);
- spin_lock_irq(lock);
- }
-
+ /* Account for the thread group leader hanging around: */
+ count = thread_group_leader(tsk) ? 1 : 2;
sig->notify_count = count;
while (atomic_read(&sig->count) > count) {
__set_current_state(TASK_UNINTERRUPTIBLE);
OpenPOWER on IntegriCloud