diff options
Diffstat (limited to 'kernel/ptrace.c')
-rw-r--r-- | kernel/ptrace.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 1653d35419a1..4a1745f1dadf 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -501,3 +501,11 @@ int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data) | |||
501 | return -EIO; | 501 | return -EIO; |
502 | return put_user(tmp, (unsigned long __user *)data); | 502 | return put_user(tmp, (unsigned long __user *)data); |
503 | } | 503 | } |
504 | |||
505 | int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data) | ||
506 | { | ||
507 | int copied; | ||
508 | |||
509 | copied = access_process_vm(tsk, addr, &data, sizeof(data), 1); | ||
510 | return (copied == sizeof(data)) ? 0 : -EIO; | ||
511 | } | ||