Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256838
b: refs/heads/master
c: 62c124f
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Oleg Nesterov committed Jun 4, 2011
1 parent 55c8751 commit edc0e62
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 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: 7dd3db54e77d21eb95e145f19ba53f68250d0e73
refs/heads/master: 62c124ff3bcdb414af635c2bf822c9e4f2a5abfa
10 changes: 8 additions & 2 deletions trunk/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
#include <linux/hw_breakpoint.h>


static int ptrace_trapping_sleep_fn(void *flags)
{
schedule();
return 0;
}

/*
* ptrace a task: make the debugger its new parent and
* move it to the ptrace list.
Expand Down Expand Up @@ -270,8 +276,8 @@ static int ptrace_attach(struct task_struct *task)
mutex_unlock(&task->signal->cred_guard_mutex);
out:
if (!retval)
wait_event(current->signal->wait_chldexit,
!(task->jobctl & JOBCTL_TRAPPING));
wait_on_bit(&task->jobctl, JOBCTL_TRAPPING_BIT,
ptrace_trapping_sleep_fn, TASK_UNINTERRUPTIBLE);
return retval;
}

Expand Down
3 changes: 1 addition & 2 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@ static void task_clear_jobctl_trapping(struct task_struct *task)
{
if (unlikely(task->jobctl & JOBCTL_TRAPPING)) {
task->jobctl &= ~JOBCTL_TRAPPING;
__wake_up_sync_key(&task->parent->signal->wait_chldexit,
TASK_UNINTERRUPTIBLE, 1, task);
wake_up_bit(&task->jobctl, JOBCTL_TRAPPING_BIT);
}
}

Expand Down

0 comments on commit edc0e62

Please sign in to comment.