Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198750
b: refs/heads/master
c: d344193
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed May 27, 2010
1 parent 32355b0 commit afaeb09
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 09faef11df8c559a23e2405d123cb2683733a79a
refs/heads/master: d344193a05da89c97e965da2c5cbf687d7385eae
11 changes: 5 additions & 6 deletions trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,6 @@ static int de_thread(struct task_struct *tsk)
struct signal_struct *sig = tsk->signal;
struct sighand_struct *oldsighand = tsk->sighand;
spinlock_t *lock = &oldsighand->siglock;
int count;

if (thread_group_empty(tsk))
goto no_thread_group;
Expand All @@ -785,13 +784,13 @@ static int de_thread(struct task_struct *tsk)
spin_unlock_irq(lock);
return -EAGAIN;
}

sig->group_exit_task = tsk;
zap_other_threads(tsk);
sig->notify_count = zap_other_threads(tsk);
if (!thread_group_leader(tsk))
sig->notify_count--;

/* 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) {
while (sig->notify_count) {
__set_current_state(TASK_UNINTERRUPTIBLE);
spin_unlock_irq(lock);
schedule();
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static void __exit_signal(struct task_struct *tsk)
* If there is any task waiting for the group exit
* then notify it:
*/
if (sig->group_exit_task && atomic_read(&sig->count) == sig->notify_count)
if (sig->notify_count > 0 && !--sig->notify_count)
wake_up_process(sig->group_exit_task);

if (tsk == sig->curr_target)
Expand Down

0 comments on commit afaeb09

Please sign in to comment.