aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/ptrace.c')
-rw-r--r--arch/s390/kernel/ptrace.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index 38ff2bce1203..75c496f4f16d 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -204,7 +204,6 @@ static unsigned long __peek_user(struct task_struct *child, addr_t addr)
204static int 204static int
205peek_user(struct task_struct *child, addr_t addr, addr_t data) 205peek_user(struct task_struct *child, addr_t addr, addr_t data)
206{ 206{
207 struct user *dummy = NULL;
208 addr_t tmp, mask; 207 addr_t tmp, mask;
209 208
210 /* 209 /*
@@ -213,8 +212,8 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data)
213 */ 212 */
214 mask = __ADDR_MASK; 213 mask = __ADDR_MASK;
215#ifdef CONFIG_64BIT 214#ifdef CONFIG_64BIT
216 if (addr >= (addr_t) &dummy->regs.acrs && 215 if (addr >= (addr_t) &((struct user *) NULL)->regs.acrs &&
217 addr < (addr_t) &dummy->regs.orig_gpr2) 216 addr < (addr_t) &((struct user *) NULL)->regs.orig_gpr2)
218 mask = 3; 217 mask = 3;
219#endif 218#endif
220 if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK) 219 if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK)
@@ -312,7 +311,6 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data)
312static int 311static int
313poke_user(struct task_struct *child, addr_t addr, addr_t data) 312poke_user(struct task_struct *child, addr_t addr, addr_t data)
314{ 313{
315 struct user *dummy = NULL;
316 addr_t mask; 314 addr_t mask;
317 315
318 /* 316 /*
@@ -321,8 +319,8 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data)
321 */ 319 */
322 mask = __ADDR_MASK; 320 mask = __ADDR_MASK;
323#ifdef CONFIG_64BIT 321#ifdef CONFIG_64BIT
324 if (addr >= (addr_t) &dummy->regs.acrs && 322 if (addr >= (addr_t) &((struct user *) NULL)->regs.acrs &&
325 addr < (addr_t) &dummy->regs.orig_gpr2) 323 addr < (addr_t) &((struct user *) NULL)->regs.orig_gpr2)
326 mask = 3; 324 mask = 3;
327#endif 325#endif
328 if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK) 326 if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK)