Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256836
b: refs/heads/master
c: 6dfca32
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Oleg Nesterov committed Jun 4, 2011
1 parent a1e0ce8 commit a374a52
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 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: 3759a0d94c18764247b66511d1038f2b93aa95de
refs/heads/master: 6dfca32984237a8a011b5bf367e53341a265b2a4
2 changes: 1 addition & 1 deletion trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ static int zap_process(struct task_struct *start, int exit_code)

t = start;
do {
task_clear_jobctl_pending(t, JOBCTL_STOP_PENDING);
task_clear_jobctl_pending(t, JOBCTL_PENDING_MASK);
if (t != current && t->mm) {
sigaddset(&t->pending.signal, SIGKILL);
signal_wake_up(t, 1);
Expand Down
13 changes: 8 additions & 5 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ static void task_clear_jobctl_trapping(struct task_struct *task)
* %JOBCTL_PENDING_MASK. If %JOBCTL_STOP_PENDING is being cleared, other
* STOP bits are cleared together.
*
* If clearing of @mask leaves no stop or trap pending, this function calls
* task_clear_jobctl_trapping().
*
* CONTEXT:
* Must be called with @task->sighand->siglock held.
*/
Expand All @@ -264,6 +267,9 @@ void task_clear_jobctl_pending(struct task_struct *task, unsigned int mask)
mask |= JOBCTL_STOP_CONSUME | JOBCTL_STOP_DEQUEUED;

task->jobctl &= ~mask;

if (!(task->jobctl & JOBCTL_PENDING_MASK))
task_clear_jobctl_trapping(task);
}

/**
Expand Down Expand Up @@ -933,7 +939,7 @@ static void complete_signal(int sig, struct task_struct *p, int group)
signal->group_stop_count = 0;
t = p;
do {
task_clear_jobctl_pending(t, JOBCTL_STOP_PENDING);
task_clear_jobctl_pending(t, JOBCTL_PENDING_MASK);
sigaddset(&t->pending.signal, SIGKILL);
signal_wake_up(t, 1);
} while_each_thread(p, t);
Expand Down Expand Up @@ -1168,7 +1174,7 @@ int zap_other_threads(struct task_struct *p)
p->signal->group_stop_count = 0;

while_each_thread(p, t) {
task_clear_jobctl_pending(t, JOBCTL_STOP_PENDING);
task_clear_jobctl_pending(t, JOBCTL_PENDING_MASK);
count++;

/* Don't bother with already dead threads */
Expand Down Expand Up @@ -1964,9 +1970,6 @@ static int do_signal_stop(int signr)
goto retry;
}

/* PTRACE_ATTACH might have raced with task killing, clear trapping */
task_clear_jobctl_trapping(current);

spin_unlock_irq(&current->sighand->siglock);

tracehook_finish_jctl();
Expand Down

0 comments on commit a374a52

Please sign in to comment.