diff options
Diffstat (limited to 'arch/x86_64/kernel/ptrace.c')
-rw-r--r-- | arch/x86_64/kernel/ptrace.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c index 2d50024c9f30..d35ec1bc696a 100644 --- a/arch/x86_64/kernel/ptrace.c +++ b/arch/x86_64/kernel/ptrace.c | |||
@@ -420,9 +420,13 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
420 | if ((0x5554 >> ((data >> (16 + 4*i)) & 0xf)) & 1) | 420 | if ((0x5554 >> ((data >> (16 + 4*i)) & 0xf)) & 1) |
421 | break; | 421 | break; |
422 | if (i == 4) { | 422 | if (i == 4) { |
423 | child->thread.debugreg7 = data; | 423 | child->thread.debugreg7 = data; |
424 | if (data) | ||
425 | set_tsk_thread_flag(child, TIF_DEBUG); | ||
426 | else | ||
427 | clear_tsk_thread_flag(child, TIF_DEBUG); | ||
424 | ret = 0; | 428 | ret = 0; |
425 | } | 429 | } |
426 | break; | 430 | break; |
427 | } | 431 | } |
428 | break; | 432 | break; |