diff options
author | Alexey Dobriyan <adobriyan@sw.ru> | 2007-10-16 04:23:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:42:49 -0400 |
commit | 1bcf548293aef19b0797348332cf1dfbf2116cef (patch) | |
tree | 80b2535e3dd2a6d23c15b91e10cae227310a44ee /arch/x86 | |
parent | e6716b87d5c9edf19c711212785cd30c6ec21868 (diff) |
Consolidate PTRACE_DETACH
Identical handlers of PTRACE_DETACH go into ptrace_request().
Not touching compat code.
Not touching archs that don't call ptrace_request.
Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/ptrace_32.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/ptrace_64.c | 5 |
2 files changed, 0 insertions, 10 deletions
diff --git a/arch/x86/kernel/ptrace_32.c b/arch/x86/kernel/ptrace_32.c index 0cecd7513c97..8622b9cd3e38 100644 --- a/arch/x86/kernel/ptrace_32.c +++ b/arch/x86/kernel/ptrace_32.c | |||
@@ -524,11 +524,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
524 | ret = 0; | 524 | ret = 0; |
525 | break; | 525 | break; |
526 | 526 | ||
527 | case PTRACE_DETACH: | ||
528 | /* detach a process that was attached. */ | ||
529 | ret = ptrace_detach(child, data); | ||
530 | break; | ||
531 | |||
532 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ | 527 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ |
533 | if (!access_ok(VERIFY_WRITE, datap, FRAME_SIZE*sizeof(long))) { | 528 | if (!access_ok(VERIFY_WRITE, datap, FRAME_SIZE*sizeof(long))) { |
534 | ret = -EIO; | 529 | ret = -EIO; |
diff --git a/arch/x86/kernel/ptrace_64.c b/arch/x86/kernel/ptrace_64.c index c0cac42df3b6..86321ee6da93 100644 --- a/arch/x86/kernel/ptrace_64.c +++ b/arch/x86/kernel/ptrace_64.c | |||
@@ -500,11 +500,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
500 | ret = 0; | 500 | ret = 0; |
501 | break; | 501 | break; |
502 | 502 | ||
503 | case PTRACE_DETACH: | ||
504 | /* detach a process that was attached. */ | ||
505 | ret = ptrace_detach(child, data); | ||
506 | break; | ||
507 | |||
508 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ | 503 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ |
509 | if (!access_ok(VERIFY_WRITE, (unsigned __user *)data, | 504 | if (!access_ok(VERIFY_WRITE, (unsigned __user *)data, |
510 | sizeof(struct user_regs_struct))) { | 505 | sizeof(struct user_regs_struct))) { |