summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/hw_breakpoint.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2010-02-04 17:26:31 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2010-02-04 17:26:31 +1100
commitc6e0278d647b3b27bdbea4bc01f8946b104b6277 (patch)
tree06f15abc4462c9fd4bc48da0404e73791bb60bfc /arch/x86/kernel/hw_breakpoint.c
parent2208cd4bf0d9d6444f871c1c82a5df55b986e399 (diff)
parent774c21db21936e8ba41d66917ffa8f0e131bf122 (diff)
Merge remote branch 'tip/auto-latest'
Conflicts: kernel/kgdb.c
Diffstat (limited to 'arch/x86/kernel/hw_breakpoint.c')
-rw-r--r--arch/x86/kernel/hw_breakpoint.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/kernel/hw_breakpoint.c b/arch/x86/kernel/hw_breakpoint.c
index 05d5fec64a94..ae90b4739435 100644
--- a/arch/x86/kernel/hw_breakpoint.c
+++ b/arch/x86/kernel/hw_breakpoint.c
@@ -502,8 +502,6 @@ static int __kprobes hw_breakpoint_handler(struct die_args *args)
rcu_read_lock();
bp = per_cpu(bp_per_reg[i], cpu);
- if (bp)
- rc = NOTIFY_DONE;
/*
* Reset the 'i'th TRAP bit in dr6 to denote completion of
* exception handling
@@ -522,7 +520,13 @@ static int __kprobes hw_breakpoint_handler(struct die_args *args)
rcu_read_unlock();
}
- if (dr6 & (~DR_TRAP_BITS))
+ /*
+ * Further processing in do_debug() is needed for a) user-space
+ * breakpoints (to generate signals) and b) when the system has
+ * taken exception due to multiple causes
+ */
+ if ((current->thread.debugreg6 & DR_TRAP_BITS) ||
+ (dr6 & (~DR_TRAP_BITS)))
rc = NOTIFY_DONE;
set_debugreg(dr7, 7);