diff options
author | Tejun Heo <tj@kernel.org> | 2011-03-23 05:37:00 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-03-23 05:37:00 -0400 |
commit | 9f2bf6513a6cca0b00cbbf67ba6197017cfba548 (patch) | |
tree | da20b400d446248fb9a578cc40da08d4398830bc | |
parent | c672af35d54992b88d3c48133bd62cc3386fb2f9 (diff) |
ptrace: Remove the extra wake_up_state() from ptrace_detach()
This wake_up_state() has a turbulent history. This is a remnant from
ancient ptrace implementation and patently wrong. Commit 95a3540d
(ptrace_detach: the wrong wakeup breaks the ERESTARTxxx logic) removed
it but the change was reverted later by commit edaba2c5 (ptrace:
revert "ptrace_detach: the wrong wakeup breaks the ERESTARTxxx logic")
citing compatibility breakage and general brokeness of the whole group
stop / ptrace interaction. Then, recently, it got converted from
wake_up_process() to wake_up_state() to make it less dangerous.
Digging through the mailing archives, the compatibility breakage
doesn't seem to be critical in the sense that the behavior isn't well
defined or reliable to begin with and it seems to have been agreed to
remove the wakeup with proper cleanup of the whole thing.
Now that the group stop and its interaction with ptrace are being
cleaned up, it's high time to finally kill this silliness.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
-rw-r--r-- | kernel/ptrace.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index e2302e40b360..6acf8954017c 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -312,8 +312,6 @@ static int ptrace_detach(struct task_struct *child, unsigned int data) | |||
312 | if (child->ptrace) { | 312 | if (child->ptrace) { |
313 | child->exit_code = data; | 313 | child->exit_code = data; |
314 | dead = __ptrace_detach(current, child); | 314 | dead = __ptrace_detach(current, child); |
315 | if (!child->exit_state) | ||
316 | wake_up_state(child, TASK_TRACED | TASK_STOPPED); | ||
317 | } | 315 | } |
318 | write_unlock_irq(&tasklist_lock); | 316 | write_unlock_irq(&tasklist_lock); |
319 | 317 | ||