summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/ptrace.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-02-22 08:55:32 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-22 08:55:32 -0800
commitbee415ce427d1eab6cfb30221461c7d20cbf1903 (patch)
tree406b70a86768535105b226c2b2f0a59b301cc52e /arch/x86/kernel/ptrace.c
parent627fa177a1502ad24390d945851209ac022f3a36 (diff)
parent388c3aab5d4f1b0bbfe2d5f47e7cd681866bc573 (diff)
downloadlinux-bee415ce427d1eab6cfb30221461c7d20cbf1903.tar.gz
linux-bee415ce427d1eab6cfb30221461c7d20cbf1903.tar.bz2
linux-bee415ce427d1eab6cfb30221461c7d20cbf1903.zip
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf probe: Init struct probe_point and set counter correctly hw-breakpoint: Keep track of dr7 local enable bits hw-breakpoints: Accept breakpoints on NULL address perf_events: Fix FORK events
Diffstat (limited to 'arch/x86/kernel/ptrace.c')
-rw-r--r--arch/x86/kernel/ptrace.c7
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)
} else if (n == 6) {
val = thread->debugreg6;
} else if (n == 7) {
- val = ptrace_get_dr7(thread->ptrace_bps);
+ val = thread->ptrace_dr7;
}
return val;
}
@@ -778,8 +778,11 @@ int ptrace_set_debugreg(struct task_struct *tsk, int n, unsigned long val)
return rc;
}
/* All that's left is DR7 */
- if (n == 7)
+ if (n == 7) {
rc = ptrace_write_dr7(tsk, val);
+ if (!rc)
+ thread->ptrace_dr7 = val;
+ }
ret_path:
return rc;