diff options
-rw-r--r-- | arch/x86/kernel/uprobes.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c index ecbffd16d090..f4464b1b9435 100644 --- a/arch/x86/kernel/uprobes.c +++ b/arch/x86/kernel/uprobes.c | |||
@@ -687,6 +687,12 @@ int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) | |||
687 | { | 687 | { |
688 | struct uprobe_task *utask = current->utask; | 688 | struct uprobe_task *utask = current->utask; |
689 | 689 | ||
690 | if (auprobe->ops->pre_xol) { | ||
691 | int err = auprobe->ops->pre_xol(auprobe, regs); | ||
692 | if (err) | ||
693 | return err; | ||
694 | } | ||
695 | |||
690 | regs->ip = utask->xol_vaddr; | 696 | regs->ip = utask->xol_vaddr; |
691 | utask->autask.saved_trap_nr = current->thread.trap_nr; | 697 | utask->autask.saved_trap_nr = current->thread.trap_nr; |
692 | current->thread.trap_nr = UPROBE_TRAP_NR; | 698 | current->thread.trap_nr = UPROBE_TRAP_NR; |
@@ -696,8 +702,6 @@ int arch_uprobe_pre_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) | |||
696 | if (test_tsk_thread_flag(current, TIF_BLOCKSTEP)) | 702 | if (test_tsk_thread_flag(current, TIF_BLOCKSTEP)) |
697 | set_task_blockstep(current, false); | 703 | set_task_blockstep(current, false); |
698 | 704 | ||
699 | if (auprobe->ops->pre_xol) | ||
700 | return auprobe->ops->pre_xol(auprobe, regs); | ||
701 | return 0; | 705 | return 0; |
702 | } | 706 | } |
703 | 707 | ||