aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/ptrace_32.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-24 13:04:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-24 13:04:05 -0400
commit4d4fcae1d4a10c6cf3c8ca2ec61d2d3270f1225e (patch)
treefb09c210f8402cb7201b6ae4797343adcf4b73ac /arch/sh/kernel/ptrace_32.c
parentb4a41ed24c858d75985c7dcba685715fdf2e6114 (diff)
parentb15ed691667f59867c9c130b8d84feda4050be04 (diff)
Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: sh: Fix build alloc_thread_info_node function sh: Fix ptrace hw_breakpoint handling sh: Fix ptrace fpu state initialisation sh: Re-enable GENERIC_HARDIRQS_NO_DEPRECATED. sh: pmb: Use struct syscore_ops instead of sysdevs sh: Use struct syscore_ops instead of sysdevs sh: Conver to asm-generic/sizes.h. sh: wire up sys_syncfs.
Diffstat (limited to 'arch/sh/kernel/ptrace_32.c')
-rw-r--r--arch/sh/kernel/ptrace_32.c8
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)