diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/ptrace.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index b1d11f1c7cf7..1653d35419a1 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -490,3 +490,14 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data) | |||
490 | return ret; | 490 | return ret; |
491 | } | 491 | } |
492 | #endif /* __ARCH_SYS_PTRACE */ | 492 | #endif /* __ARCH_SYS_PTRACE */ |
493 | |||
494 | int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data) | ||
495 | { | ||
496 | unsigned long tmp; | ||
497 | int copied; | ||
498 | |||
499 | copied = access_process_vm(tsk, addr, &tmp, sizeof(tmp), 0); | ||
500 | if (copied != sizeof(tmp)) | ||
501 | return -EIO; | ||
502 | return put_user(tmp, (unsigned long __user *)data); | ||
503 | } | ||