Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256868
b: refs/heads/master
c: 8a35241
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov committed Jul 21, 2011
1 parent 3a8e29b commit 5d2199a
Show file tree
Hide file tree
Showing 2 changed files with 12 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: f701e5b73a1a79ea62ffd45d9e2bed4c7d5c1fd2
refs/heads/master: 8a35241803eeb0e9fd3fe27835d6b2775c73b641
17 changes: 11 additions & 6 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2084,12 +2084,17 @@ static void do_jobctl_trap(void)
static int ptrace_signal(int signr, siginfo_t *info,
struct pt_regs *regs, void *cookie)
{
if (!current->ptrace)
return signr;

ptrace_signal_deliver(regs, cookie);

/* Let the debugger run. */
/*
* We do not check sig_kernel_stop(signr) but set this marker
* unconditionally because we do not know whether debugger will
* change signr. This flag has no meaning unless we are going
* to stop after return from ptrace_stop(). In this case it will
* be checked in do_signal_stop(), we should only stop if it was
* not cleared by SIGCONT while we were sleeping. See also the
* comment in dequeue_signal().
*/
current->jobctl |= JOBCTL_STOP_DEQUEUED;
ptrace_stop(signr, CLD_TRAPPED, 0, info);

/* We're back. Did the debugger cancel the sig? */
Expand Down Expand Up @@ -2193,7 +2198,7 @@ int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
if (!signr)
break; /* will return 0 */

if (signr != SIGKILL) {
if (unlikely(current->ptrace) && signr != SIGKILL) {
signr = ptrace_signal(signr, info,
regs, cookie);
if (!signr)
Expand Down

0 comments on commit 5d2199a

Please sign in to comment.