From: Yang Bo <yangbo@deepin.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Laura Abbott <labbott@redhat.com>,
linux-kernel@vger.kernel.org, Yang Bo <yangbo@deepin.com>
Subject: [PATCH] x86/kprobe: unbalanced preempt counter in kprobe_{fault,debug}_handler
Date: Mon, 15 Jan 2018 12:28:28 +0800 [thread overview]
Message-ID: <20180115042828.21004-1-yangbo@deepin.com> (raw)
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
reply other threads:[~2018-01-15 4:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180115042828.21004-1-yangbo@deepin.com \
--to=yangbo@deepin.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®