Skip to content

Commit a038ae7

Browse files
seehearfeelchenhuacai
authored andcommitted
LoongArch: Return earlier in die() if notify_die() returns NOTIFY_STOP
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> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 6933c11 commit a038ae7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arch/loongarch/kernel/traps.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ void die(const char *str, struct pt_regs *regs)
404404

405405
oops_exit();
406406

407+
if (ret == NOTIFY_STOP)
408+
return;
409+
407410
if (regs && kexec_should_crash(current))
408411
crash_kexec(regs);
409412

@@ -413,8 +416,7 @@ void die(const char *str, struct pt_regs *regs)
413416
if (panic_on_oops)
414417
panic("Fatal exception");
415418

416-
if (ret != NOTIFY_STOP)
417-
make_task_dead(SIGSEGV);
419+
make_task_dead(SIGSEGV);
418420
}
419421

420422
static inline void setup_vint_size(unsigned int size)

0 commit comments

Comments
 (0)