diff options
Diffstat (limited to 'arch/i386/kernel/ptrace.c')
-rw-r--r-- | arch/i386/kernel/ptrace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index fd7eaf7866e0..d3db03f4085d 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c | |||
@@ -468,8 +468,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
468 | for(i=0; i<4; i++) | 468 | for(i=0; i<4; i++) |
469 | if ((0x5f54 >> ((data >> (16 + 4*i)) & 0xf)) & 1) | 469 | if ((0x5f54 >> ((data >> (16 + 4*i)) & 0xf)) & 1) |
470 | goto out_tsk; | 470 | goto out_tsk; |
471 | if (data) | ||
472 | set_tsk_thread_flag(child, TIF_DEBUG); | ||
473 | else | ||
474 | clear_tsk_thread_flag(child, TIF_DEBUG); | ||
471 | } | 475 | } |
472 | |||
473 | addr -= (long) &dummy->u_debugreg; | 476 | addr -= (long) &dummy->u_debugreg; |
474 | addr = addr >> 2; | 477 | addr = addr >> 2; |
475 | child->thread.debugreg[addr] = data; | 478 | child->thread.debugreg[addr] = data; |