diff options
Diffstat (limited to 'arch/x86/kernel/ptrace.c')
-rw-r--r-- | arch/x86/kernel/ptrace.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 017d937639fe..0c1033d61e59 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -702,7 +702,7 @@ static unsigned long ptrace_get_debugreg(struct task_struct *tsk, int n) | |||
702 | } else if (n == 6) { | 702 | } else if (n == 6) { |
703 | val = thread->debugreg6; | 703 | val = thread->debugreg6; |
704 | } else if (n == 7) { | 704 | } else if (n == 7) { |
705 | val = ptrace_get_dr7(thread->ptrace_bps); | 705 | val = thread->ptrace_dr7; |
706 | } | 706 | } |
707 | return val; | 707 | return val; |
708 | } | 708 | } |
@@ -778,8 +778,11 @@ int ptrace_set_debugreg(struct task_struct *tsk, int n, unsigned long val) | |||
778 | return rc; | 778 | return rc; |
779 | } | 779 | } |
780 | /* All that's left is DR7 */ | 780 | /* All that's left is DR7 */ |
781 | if (n == 7) | 781 | if (n == 7) { |
782 | rc = ptrace_write_dr7(tsk, val); | 782 | rc = ptrace_write_dr7(tsk, val); |
783 | if (!rc) | ||
784 | thread->ptrace_dr7 = val; | ||
785 | } | ||
783 | 786 | ||
784 | ret_path: | 787 | ret_path: |
785 | return rc; | 788 | return rc; |