From: Tiejun Chen <tiejun.chen@windriver.com>
To: <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [v2 PATCH 2/2] booke/kprobe: remove unnecessary preempt_enable_no_resched
Date: Mon, 11 Jul 2011 10:39:35 +0800 [thread overview]
Message-ID: <1310351976-24078-2-git-send-email-tiejun.chen@windriver.com> (raw)
In-Reply-To: <1310351976-24078-1-git-send-email-tiejun.chen@windriver.com>
When enable CONFIG_PREEMPT we will trigger the following call trace:
BUG: scheduling while atomic: swapper/1/0x10000000
...
krpobe always goes through the following path:
program_check_exception()
|
+ notify_die(DIE_BPT, "breakpoint",...)
|
+ kprobe_handler()
|
+ preempt_disable();
+ break_handler() <- preempt_enable_no_resched()
+ emulate_step()
+ preempt_enable_no_resched()
...
exit
We should remove unnecessary preempt_enable_no_resched() inside of break_handler()
since looks longjmp_break_handler() always go the above path.
Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
---
arch/powerpc/kernel/kprobes.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index bc47352..a8a2a4d 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -552,7 +552,6 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
* saved regs...
*/
memcpy(regs, &kcb->jprobe_saved_regs, sizeof(struct pt_regs));
- preempt_enable_no_resched();
return 1;
}
--
1.5.6
next prev parent reply other threads:[~2011-07-11 2:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-11 2:39 [v2 PATCH 1/2] booke/kprobe: make program exception to use one dedicated exception stack Tiejun Chen
2011-07-11 2:39 ` Tiejun Chen [this message]
2011-07-11 2:39 ` v2 booke/kprobe: Fix stack corrupt issue when kprobe 'stwu' Tiejun Chen
2011-07-11 5:55 ` [v2 PATCH 2/2] booke/kprobe: remove unnecessary preempt_enable_no_resched Ananth N Mavinakayanahalli
2011-07-11 8:34 ` tiejun.chen
2011-07-11 11:28 ` tiejun.chen
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=1310351976-24078-2-git-send-email-tiejun.chen@windriver.com \
--to=tiejun.chen@windriver.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).