diff options
author | Christoph Hellwig <hch@lst.de> | 2007-10-16 04:26:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:04 -0400 |
commit | 0ac15559150a20d39d381a6be44cdea373584222 (patch) | |
tree | 10be83ffe3197f029beffd242b7ddf21dcc25a35 /kernel | |
parent | dab8f4963ae0a79b945b8ed297e30d390a9d9f50 (diff) |
m32r: convert to generic sys_ptrace
Convert m32r to the generic sys_ptrace. The conversion requires an
architecture hook after ptrace_attach which this patch adds. The hook
will also be needed for a conersion of ia64 to the generic ptrace code.
Thanks to Hirokazu Takata for fixing a bug in the first version of this
code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/ptrace.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 0870523c2ae4..a73ebd3b9d4c 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -453,6 +453,10 @@ struct task_struct *ptrace_get_task_struct(pid_t pid) | |||
453 | return child; | 453 | return child; |
454 | } | 454 | } |
455 | 455 | ||
456 | #ifndef arch_ptrace_attach | ||
457 | #define arch_ptrace_attach(child) do { } while (0) | ||
458 | #endif | ||
459 | |||
456 | #ifndef __ARCH_SYS_PTRACE | 460 | #ifndef __ARCH_SYS_PTRACE |
457 | asmlinkage long sys_ptrace(long request, long pid, long addr, long data) | 461 | asmlinkage long sys_ptrace(long request, long pid, long addr, long data) |
458 | { | 462 | { |
@@ -476,6 +480,12 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data) | |||
476 | 480 | ||
477 | if (request == PTRACE_ATTACH) { | 481 | if (request == PTRACE_ATTACH) { |
478 | ret = ptrace_attach(child); | 482 | ret = ptrace_attach(child); |
483 | /* | ||
484 | * Some architectures need to do book-keeping after | ||
485 | * a ptrace attach. | ||
486 | */ | ||
487 | if (!ret) | ||
488 | arch_ptrace_attach(child); | ||
479 | goto out_put_task_struct; | 489 | goto out_put_task_struct; |
480 | } | 490 | } |
481 | 491 | ||