diff options
-rw-r--r-- | arch/x86/kernel/hw_breakpoint.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/hw_breakpoint.c b/arch/x86/kernel/hw_breakpoint.c index a8f1b803d2f..eaa6ae2a010 100644 --- a/arch/x86/kernel/hw_breakpoint.c +++ b/arch/x86/kernel/hw_breakpoint.c | |||
@@ -466,6 +466,13 @@ static int __kprobes hw_breakpoint_handler(struct die_args *args) | |||
466 | 466 | ||
467 | perf_bp_event(bp, args->regs); | 467 | perf_bp_event(bp, args->regs); |
468 | 468 | ||
469 | /* | ||
470 | * Set up resume flag to avoid breakpoint recursion when | ||
471 | * returning back to origin. | ||
472 | */ | ||
473 | if (bp->hw.info.type == X86_BREAKPOINT_EXECUTE) | ||
474 | args->regs->flags |= X86_EFLAGS_RF; | ||
475 | |||
469 | rcu_read_unlock(); | 476 | rcu_read_unlock(); |
470 | } | 477 | } |
471 | /* | 478 | /* |