diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-02-04 17:26:31 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-02-04 17:26:31 +1100 |
commit | c6e0278d647b3b27bdbea4bc01f8946b104b6277 (patch) | |
tree | 06f15abc4462c9fd4bc48da0404e73791bb60bfc /arch/x86/kernel/hw_breakpoint.c | |
parent | 2208cd4bf0d9d6444f871c1c82a5df55b986e399 (diff) | |
parent | 774c21db21936e8ba41d66917ffa8f0e131bf122 (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.c | 10 |
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); |