Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264110
b: refs/heads/master
c: f9d81f6
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Sep 25, 2011
1 parent 05134c6 commit 16f15ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 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: b172e38e435a158cc84169d5b9127a8dd8d21e76
refs/heads/master: f9d81f61c84aca693bc353dfef4b8c36c2e5e1b5
23 changes: 10 additions & 13 deletions trunk/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,20 +744,17 @@ int ptrace_request(struct task_struct *child, long request,
break;

si = child->last_siginfo;
if (unlikely(!si || si->si_code >> 8 != PTRACE_EVENT_STOP))
break;

child->jobctl |= JOBCTL_LISTENING;

/*
* If NOTIFY is set, it means event happened between start
* of this trap and now. Trigger re-trap immediately.
*/
if (child->jobctl & JOBCTL_TRAP_NOTIFY)
signal_wake_up(child, true);

if (likely(si && (si->si_code >> 8) == PTRACE_EVENT_STOP)) {
child->jobctl |= JOBCTL_LISTENING;
/*
* If NOTIFY is set, it means event happened between
* start of this trap and now. Trigger re-trap.
*/
if (child->jobctl & JOBCTL_TRAP_NOTIFY)
signal_wake_up(child, true);
ret = 0;
}
unlock_task_sighand(child, &flags);
ret = 0;
break;

case PTRACE_DETACH: /* detach a process that was attached. */
Expand Down

0 comments on commit 16f15ab

Please sign in to comment.