diff options
Diffstat (limited to 'arch/um/sys-i386/ptrace.c')
-rw-r--r-- | arch/um/sys-i386/ptrace.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/arch/um/sys-i386/ptrace.c b/arch/um/sys-i386/ptrace.c index 8032a105949a..ff94eded93eb 100644 --- a/arch/um/sys-i386/ptrace.c +++ b/arch/um/sys-i386/ptrace.c | |||
@@ -124,22 +124,22 @@ unsigned long getreg(struct task_struct *child, int regno) | |||
124 | int peek_user(struct task_struct *child, long addr, long data) | 124 | int peek_user(struct task_struct *child, long addr, long data) |
125 | { | 125 | { |
126 | /* read the word at location addr in the USER area. */ | 126 | /* read the word at location addr in the USER area. */ |
127 | unsigned long tmp; | 127 | unsigned long tmp; |
128 | 128 | ||
129 | if ((addr & 3) || addr < 0) | 129 | if ((addr & 3) || addr < 0) |
130 | return -EIO; | 130 | return -EIO; |
131 | 131 | ||
132 | tmp = 0; /* Default return condition */ | 132 | tmp = 0; /* Default return condition */ |
133 | if(addr < MAX_REG_OFFSET){ | 133 | if(addr < MAX_REG_OFFSET){ |
134 | tmp = getreg(child, addr); | 134 | tmp = getreg(child, addr); |
135 | } | 135 | } |
136 | else if((addr >= offsetof(struct user, u_debugreg[0])) && | 136 | else if((addr >= offsetof(struct user, u_debugreg[0])) && |
137 | (addr <= offsetof(struct user, u_debugreg[7]))){ | 137 | (addr <= offsetof(struct user, u_debugreg[7]))){ |
138 | addr -= offsetof(struct user, u_debugreg[0]); | 138 | addr -= offsetof(struct user, u_debugreg[0]); |
139 | addr = addr >> 2; | 139 | addr = addr >> 2; |
140 | tmp = child->thread.arch.debugregs[addr]; | 140 | tmp = child->thread.arch.debugregs[addr]; |
141 | } | 141 | } |
142 | return put_user(tmp, (unsigned long *) data); | 142 | return put_user(tmp, (unsigned long __user *) data); |
143 | } | 143 | } |
144 | 144 | ||
145 | struct i387_fxsave_struct { | 145 | struct i387_fxsave_struct { |