Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256834
b: refs/heads/master
c: 81be24b
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Oleg Nesterov committed Jun 4, 2011
1 parent 4500209 commit efe9d76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 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: 755e276b3326f300585435d2f3876e66e248c476
refs/heads/master: 81be24b8cdeb69e62f9d1b6b425fd9ffdd37f581
28 changes: 13 additions & 15 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1732,6 +1732,18 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
return;
}

/*
* We're committing to trapping. TRACED should be visible before
* TRAPPING is cleared; otherwise, the tracer might fail do_wait().
* Also, transition to TRACED and updates to ->jobctl should be
* atomic with respect to siglock and should be done after the arch
* hook as siglock is released and regrabbed across it.
*/
set_current_state(TASK_TRACED);

current->last_siginfo = info;
current->exit_code = exit_code;

/*
* If @why is CLD_STOPPED, we're trapping to participate in a group
* stop. Do the bookkeeping. Note that if SIGCONT was delievered
Expand All @@ -1742,21 +1754,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
if (why == CLD_STOPPED && (current->jobctl & JOBCTL_STOP_PENDING))
gstop_done = task_participate_group_stop(current);

current->last_siginfo = info;
current->exit_code = exit_code;

/*
* TRACED should be visible before TRAPPING is cleared; otherwise,
* the tracer might fail do_wait().
*/
set_current_state(TASK_TRACED);

/*
* We're committing to trapping. Clearing JOBCTL_TRAPPING and
* transition to TASK_TRACED should be atomic with respect to
* siglock. This should be done after the arch hook as siglock is
* released and regrabbed across it.
*/
/* entering a trap, clear TRAPPING */
task_clear_jobctl_trapping(current);

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

0 comments on commit efe9d76

Please sign in to comment.