diff options
Diffstat (limited to 'arch/sh/kernel/ptrace_32.c')
-rw-r--r-- | arch/sh/kernel/ptrace_32.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index 90a15d29feeb..2130ca674e9b 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c | |||
@@ -101,6 +101,8 @@ static int set_single_step(struct task_struct *tsk, unsigned long addr) | |||
101 | 101 | ||
102 | attr = bp->attr; | 102 | attr = bp->attr; |
103 | attr.bp_addr = addr; | 103 | attr.bp_addr = addr; |
104 | /* reenable breakpoint */ | ||
105 | attr.disabled = false; | ||
104 | err = modify_user_hw_breakpoint(bp, &attr); | 106 | err = modify_user_hw_breakpoint(bp, &attr); |
105 | if (unlikely(err)) | 107 | if (unlikely(err)) |
106 | return err; | 108 | return err; |
@@ -392,6 +394,9 @@ long arch_ptrace(struct task_struct *child, long request, | |||
392 | tmp = 0; | 394 | tmp = 0; |
393 | } else { | 395 | } else { |
394 | unsigned long index; | 396 | unsigned long index; |
397 | ret = init_fpu(child); | ||
398 | if (ret) | ||
399 | break; | ||
395 | index = addr - offsetof(struct user, fpu); | 400 | index = addr - offsetof(struct user, fpu); |
396 | tmp = ((unsigned long *)child->thread.xstate) | 401 | tmp = ((unsigned long *)child->thread.xstate) |
397 | [index >> 2]; | 402 | [index >> 2]; |
@@ -423,6 +428,9 @@ long arch_ptrace(struct task_struct *child, long request, | |||
423 | else if (addr >= offsetof(struct user, fpu) && | 428 | else if (addr >= offsetof(struct user, fpu) && |
424 | addr < offsetof(struct user, u_fpvalid)) { | 429 | addr < offsetof(struct user, u_fpvalid)) { |
425 | unsigned long index; | 430 | unsigned long index; |
431 | ret = init_fpu(child); | ||
432 | if (ret) | ||
433 | break; | ||
426 | index = addr - offsetof(struct user, fpu); | 434 | index = addr - offsetof(struct user, fpu); |
427 | set_stopped_child_used_math(child); | 435 | set_stopped_child_used_math(child); |
428 | ((unsigned long *)child->thread.xstate) | 436 | ((unsigned long *)child->thread.xstate) |