All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Notifier chain called twice
@ 2011-04-12  6:44 Yury Polyanskiy
  2011-04-12 10:39 ` Sergei Shtylyov
  2011-05-12 12:50 ` Ralf Baechle
  0 siblings, 2 replies; 3+ messages in thread
From: Yury Polyanskiy @ 2011-04-12  6:44 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

Dear all,

The notifier chain is currently called twice on OOPS. Patch below.

Best,
Yury




diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 4e00f9b..fdc6773 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -375,8 +375,6 @@ void __noreturn die(const char *str, str
        unsigned long dvpret = dvpe();
 #endif /* CONFIG_MIPS_MT_SMTC */

-       notify_die(DIE_OOPS, str, regs, 0, regs_to_trapnr(regs), SIGSEGV);
-
        console_verbose();
        spin_lock_irq(&die_lock);
        bust_spinlocks(1);

[-- Attachment #2: Type: text/html, Size: 635 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Notifier chain called twice
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2011-04-12 10:39 UTC (permalink / raw)
  To: Yury Polyanskiy; +Cc: linux-mips

Hello.

On 12-04-2011 10:44, Yury Polyanskiy wrote:

> Dear all,

> The notifier chain is currently called twice on OOPS. Patch below.

    You need to provide your signoff for the patch to be applied.

> Best,
> Yury

    The greeting and goodbye shouldn't be parts of the patch.

> diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
> index 4e00f9b..fdc6773 100644
> --- a/arch/mips/kernel/traps.c
> +++ b/arch/mips/kernel/traps.c
> @@ -375,8 +375,6 @@ void __noreturn die(const char *str, str
>          unsigned long dvpret = dvpe();
>   #endif /* CONFIG_MIPS_MT_SMTC */
>
> -       notify_die(DIE_OOPS, str, regs, 0, regs_to_trapnr(regs), SIGSEGV);
> -

    Unfortunately, the patch is whitespace-mangled: all tabs have been 
replaced by spaces.

WBR, Sergei

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Notifier chain called twice
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2011-05-12 12:50 UTC (permalink / raw)
  To: Yury Polyanskiy; +Cc: linux-mips, Jason Wessel

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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-12 12:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.