diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2007-07-17 07:03:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-17 13:23:03 -0400 |
commit | 7664732315c97f48dba9d1e7339ad16fc5a320ac (patch) | |
tree | 1eb9639b0fbe3f24341cecf1dafcae192cb7bde7 /arch/s390 | |
parent | bcdcd8e725b923ad7c0de809680d5d5658a7bf8c (diff) |
PTRACE_PEEKDATA consolidation
Identical implementations of PTRACE_PEEKDATA go into generic_ptrace_peekdata()
function.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/ptrace.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 2a8f0872ea8b..28afff4e5d1b 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -294,7 +294,6 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data) | |||
294 | static int | 294 | static int |
295 | do_ptrace_normal(struct task_struct *child, long request, long addr, long data) | 295 | do_ptrace_normal(struct task_struct *child, long request, long addr, long data) |
296 | { | 296 | { |
297 | unsigned long tmp; | ||
298 | ptrace_area parea; | 297 | ptrace_area parea; |
299 | int copied, ret; | 298 | int copied, ret; |
300 | 299 | ||
@@ -304,10 +303,7 @@ do_ptrace_normal(struct task_struct *child, long request, long addr, long data) | |||
304 | /* Remove high order bit from address (only for 31 bit). */ | 303 | /* Remove high order bit from address (only for 31 bit). */ |
305 | addr &= PSW_ADDR_INSN; | 304 | addr &= PSW_ADDR_INSN; |
306 | /* read word at location addr. */ | 305 | /* read word at location addr. */ |
307 | copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); | 306 | return generic_ptrace_peekdata(child, addr, data); |
308 | if (copied != sizeof(tmp)) | ||
309 | return -EIO; | ||
310 | return put_user(tmp, (unsigned long __force __user *) data); | ||
311 | 307 | ||
312 | case PTRACE_PEEKUSR: | 308 | case PTRACE_PEEKUSR: |
313 | /* read the word at location addr in the USER area. */ | 309 | /* read the word at location addr in the USER area. */ |