From: Oleg Nesterov Date: Mon, 8 Jul 2013 23:01:06 +0000 (-0700) Subject: ptrace/x86: flush_ptrace_hw_breakpoint() shoule clear the virtual debug registers X-Git-Tag: v3.11-rc1~67^2~42 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7da04c9e363e479258135ac825734d78aecd2b0;p=pandora-kernel.git ptrace/x86: flush_ptrace_hw_breakpoint() shoule clear the virtual debug registers flush_ptrace_hw_breakpoint() destroys the counters set by ptrace, but "leaks" ->debugreg6 and ->ptrace_dr7. The problem is minor, but still it doesn't look right and flush_thread() did this until commit 66cb59172959 ("hw-breakpoints: use the new wrapper routines to access debug registers in process/thread code"). Now that PTRACE_DETACH does flush_ too this makes even more sense. Signed-off-by: Oleg Nesterov Cc: Benjamin Herrenschmidt Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jan Kratochvil Cc: Michael Neuling Cc: Paul Mackerras Cc: Paul Mundt Cc: Will Deacon Cc: Prasad Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed