lkml.org 
[lkml]   [2018]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86/kprobe: unbalanced preempt counter in kprobe_{fault,debug}_handler
Date
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@deepin.com>
---
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


\
 
 \ /
  Last update: 2018-01-15 05:28    [W:0.022 / U:3.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site