[PATCH] x86/kprobe: unbalanced preempt counter in kprobe_{fault,debug}_handler

From: Yang Bo
Date: Sun Jan 14 2018 - 23:28:46 EST


Don't see any preempt_disable() in do_debug() and do_page_fault(),
there is no need to call preempt_enable_no_resched() here.

Signed-off-by: Yang Bo <yangbo@xxxxxxxxxx>
---
arch/x86/kernel/kprobes/core.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 1ea5c9caa8f1..6f2c43e33674 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -969,7 +969,6 @@ int kprobe_debug_handler(struct pt_regs *regs)
}
reset_current_kprobe();
out:
- preempt_enable_no_resched();

/*
* if somebody else is singlestepping across a probe point, flags
@@ -1017,7 +1016,6 @@ int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
restore_previous_kprobe(kcb);
else
reset_current_kprobe();
- preempt_enable_no_resched();
} else if (kcb->kprobe_status == KPROBE_HIT_ACTIVE ||
kcb->kprobe_status == KPROBE_HIT_SSDONE) {
/*
--
2.15.1