diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-01-12 01:06:07 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 09:08:58 -0800 |
commit | 40bc9c671a9f0a5189c07a2b4280aec9b40e30cd (patch) | |
tree | b44709dbe0a5f825f6fc0a0e0bfeac1028d8c443 /arch/mips/kernel/ptrace.c | |
parent | 6450578f32cdca587ae5f148e2118b2fcc36bb11 (diff) | |
download | linux-40bc9c671a9f0a5189c07a2b4280aec9b40e30cd.tar.bz2 |
[PATCH] mips: task_pt_regs()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/mips/kernel/ptrace.c')
-rw-r--r-- | arch/mips/kernel/ptrace.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 8d2549335304..6c358b333166 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c @@ -64,8 +64,7 @@ int ptrace_getregs (struct task_struct *child, __s64 __user *data) if (!access_ok(VERIFY_WRITE, data, 38 * 8)) return -EIO; - regs = (struct pt_regs *) ((unsigned long) child->thread_info + - THREAD_SIZE - 32 - sizeof(struct pt_regs)); + regs = task_pt_regs(child); for (i = 0; i < 32; i++) __put_user (regs->regs[i], data + i); @@ -92,8 +91,7 @@ int ptrace_setregs (struct task_struct *child, __s64 __user *data) if (!access_ok(VERIFY_READ, data, 38 * 8)) return -EIO; - regs = (struct pt_regs *) ((unsigned long) child->thread_info + - THREAD_SIZE - 32 - sizeof(struct pt_regs)); + regs = task_pt_regs(child); for (i = 0; i < 32; i++) __get_user (regs->regs[i], data + i); @@ -198,8 +196,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) struct pt_regs *regs; unsigned long tmp = 0; - regs = (struct pt_regs *) ((unsigned long) child->thread_info + - THREAD_SIZE - 32 - sizeof(struct pt_regs)); + regs = task_pt_regs(child); ret = 0; /* Default return value. */ switch (addr) { @@ -314,8 +311,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) case PTRACE_POKEUSR: { struct pt_regs *regs; ret = 0; - regs = (struct pt_regs *) ((unsigned long) child->thread_info + - THREAD_SIZE - 32 - sizeof(struct pt_regs)); + regs = task_pt_regs(child); switch (addr) { case 0 ... 31: |