diff options
Diffstat (limited to 'arch/m32r/kernel/ptrace.c')
-rw-r--r-- | arch/m32r/kernel/ptrace.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c index 01a1c9ac8458..57a92ef31a90 100644 --- a/arch/m32r/kernel/ptrace.c +++ b/arch/m32r/kernel/ptrace.c | |||
@@ -619,15 +619,9 @@ do_ptrace(long request, struct task_struct *child, long addr, long data) | |||
619 | */ | 619 | */ |
620 | case PTRACE_POKETEXT: | 620 | case PTRACE_POKETEXT: |
621 | case PTRACE_POKEDATA: | 621 | case PTRACE_POKEDATA: |
622 | ret = access_process_vm(child, addr, &data, sizeof(data), 1); | 622 | ret = generic_ptrace_pokedata(child, addr, data); |
623 | if (ret == sizeof(data)) { | 623 | if (ret == 0 && request == PTRACE_POKETEXT) |
624 | ret = 0; | 624 | invalidate_cache(); |
625 | if (request == PTRACE_POKETEXT) { | ||
626 | invalidate_cache(); | ||
627 | } | ||
628 | } else { | ||
629 | ret = -EIO; | ||
630 | } | ||
631 | break; | 625 | break; |
632 | 626 | ||
633 | /* | 627 | /* |