From: Ralf Baechle <ralf@linux-mips.org>
To: Yury Polyanskiy <ypolyans@princeton.edu>
Cc: linux-mips@linux-mips.org, Jason Wessel <jason.wessel@windriver.com>
Subject: Re: [PATCH] Notifier chain called twice
Date: Thu, 12 May 2011 13:50:35 +0100 [thread overview]
Message-ID: <20110512125035.GC11400@linux-mips.org> (raw)
In-Reply-To: <BANLkTikTDQgwHtK1V4AqRAALw_HrSTuvnQ@mail.gmail.com>
On Tue, Apr 12, 2011 at 02:44:58AM -0400, Yury Polyanskiy wrote:
Shouldn't the conditional call be moved to an earlier location as below
patch does? Then again once we're in die() this probably doesn't matter
terribly much anymore.
Ralf
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/traps.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 71350f7..e9b3af2 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -374,7 +374,8 @@ void __noreturn die(const char *str, struct pt_regs *regs)
unsigned long dvpret = dvpe();
#endif /* CONFIG_MIPS_MT_SMTC */
- notify_die(DIE_OOPS, str, regs, 0, regs_to_trapnr(regs), SIGSEGV);
+ if (notify_die(DIE_OOPS, str, regs, 0, regs_to_trapnr(regs), SIGSEGV) == NOTIFY_STOP)
+ sig = 0;
console_verbose();
spin_lock_irq(&die_lock);
@@ -383,9 +384,6 @@ void __noreturn die(const char *str, struct pt_regs *regs)
mips_mt_regdump(dvpret);
#endif /* CONFIG_MIPS_MT_SMTC */
- if (notify_die(DIE_OOPS, str, regs, 0, regs_to_trapnr(regs), SIGSEGV) == NOTIFY_STOP)
- sig = 0;
-
printk("%s[#%d]:\n", str, ++die_counter);
show_registers(regs);
add_taint(TAINT_DIE);
prev parent reply other threads:[~2011-05-12 12:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-12 6:44 [PATCH] Notifier chain called twice Yury Polyanskiy
2011-04-12 10:39 ` Sergei Shtylyov
2011-05-12 12:50 ` Ralf Baechle [this message]
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=20110512125035.GC11400@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=jason.wessel@windriver.com \
--cc=linux-mips@linux-mips.org \
--cc=ypolyans@princeton.edu \
/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