diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-07-13 23:09:23 +0100 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-07-13 23:09:23 +0100 |
commit | c514720716c7b109ff980f8b3cb93f9af872c91c (patch) | |
tree | 490a9578995705de69712893a190b67651bddc56 /fs/exec.c | |
parent | 07929dcb963786512c760dd3ecd148d89295e7e5 (diff) | |
parent | 1e279dd855d15b72364b4103f872d67d8592647e (diff) | |
download | op-kernel-dev-c514720716c7b109ff980f8b3cb93f9af872c91c.zip op-kernel-dev-c514720716c7b109ff980f8b3cb93f9af872c91c.tar.gz |
Automatic merge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -642,6 +642,18 @@ static inline int de_thread(struct task_struct *tsk) count = 2; if (thread_group_leader(current)) count = 1; + else { + /* + * 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->real_timer.data = (unsigned long)current; + if (del_timer_sync(&sig->real_timer)) + add_timer(&sig->real_timer); + } while (atomic_read(&sig->count) > count) { sig->group_exit_task = current; sig->notify_count = count; |