lkml.org 
[lkml]   [2023]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 3/4] MIPS: Return earlier in die() if notify_die() returns NOTIFY_STOP
Date
After the call to oops_exit(), it should not panic or execute
the crash kernel if the oops is to be suppressed.

Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
arch/mips/kernel/traps.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 8e528a8..fd770dc 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -412,6 +412,9 @@ void die(const char *str, struct pt_regs *regs)

oops_exit();

+ if (ret == NOTIFY_STOP)
+ return;
+
if (in_interrupt())
panic("Fatal exception in interrupt");

@@ -421,8 +424,7 @@ void die(const char *str, struct pt_regs *regs)
if (regs && kexec_should_crash(current))
crash_kexec(regs);

- if (ret != NOTIFY_STOP)
- make_task_dead(SIGSEGV);
+ make_task_dead(SIGSEGV);
}

extern struct exception_table_entry __start___dbe_table[];
--
2.1.0
\
 
 \ /
  Last update: 2023-08-19 10:37    [W:0.265 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site