aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/ptrace.c
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 04:06:07 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 12:08:58 -0500
commit40bc9c671a9f0a5189c07a2b4280aec9b40e30cd (patch)
treeb44709dbe0a5f825f6fc0a0e0bfeac1028d8c443 /arch/mips/kernel/ptrace.c
parent6450578f32cdca587ae5f148e2118b2fcc36bb11 (diff)
[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.c12
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)
64 if (!access_ok(VERIFY_WRITE, data, 38 * 8)) 64 if (!access_ok(VERIFY_WRITE, data, 38 * 8))
65 return -EIO; 65 return -EIO;
66 66
67 regs = (struct pt_regs *) ((unsigned long) child->thread_info + 67 regs = task_pt_regs(child);
68 THREAD_SIZE - 32 - sizeof(struct pt_regs));
69 68
70 for (i = 0; i < 32; i++) 69 for (i = 0; i < 32; i++)
71 __put_user (regs->regs[i], data + i); 70 __put_user (regs->regs[i], data + i);
@@ -92,8 +91,7 @@ int ptrace_setregs (struct task_struct *child, __s64 __user *data)
92 if (!access_ok(VERIFY_READ, data, 38 * 8)) 91 if (!access_ok(VERIFY_READ, data, 38 * 8))
93 return -EIO; 92 return -EIO;
94 93
95 regs = (struct pt_regs *) ((unsigned long) child->thread_info + 94 regs = task_pt_regs(child);
96 THREAD_SIZE - 32 - sizeof(struct pt_regs));
97 95
98 for (i = 0; i < 32; i++) 96 for (i = 0; i < 32; i++)
99 __get_user (regs->regs[i], data + i); 97 __get_user (regs->regs[i], data + i);
@@ -198,8 +196,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
198 struct pt_regs *regs; 196 struct pt_regs *regs;
199 unsigned long tmp = 0; 197 unsigned long tmp = 0;
200 198
201 regs = (struct pt_regs *) ((unsigned long) child->thread_info + 199 regs = task_pt_regs(child);
202 THREAD_SIZE - 32 - sizeof(struct pt_regs));
203 ret = 0; /* Default return value. */ 200 ret = 0; /* Default return value. */
204 201
205 switch (addr) { 202 switch (addr) {
@@ -314,8 +311,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
314 case PTRACE_POKEUSR: { 311 case PTRACE_POKEUSR: {
315 struct pt_regs *regs; 312 struct pt_regs *regs;
316 ret = 0; 313 ret = 0;
317 regs = (struct pt_regs *) ((unsigned long) child->thread_info + 314 regs = task_pt_regs(child);
318 THREAD_SIZE - 32 - sizeof(struct pt_regs));
319 315
320 switch (addr) { 316 switch (addr) {
321 case 0 ... 31: 317 case 0 ... 31: