summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/traps.c
diff options
context:
space:
mode:
authorYue Hu <huyue2@yulong.com>2020-08-04 16:53:47 +0800
committerWill Deacon <will@kernel.org>2020-09-07 11:39:56 +0100
commitb4c971245925db1a6e0898878ad410f8f17ec59a (patch)
tree187b7947528a8c34289ac9bea6bccda851c30197 /arch/arm64/kernel/traps.c
parentf75aef392f869018f78cfedf3c320a6b3fcfda6b (diff)
downloadlwn-b4c971245925db1a6e0898878ad410f8f17ec59a.tar.gz
lwn-b4c971245925db1a6e0898878ad410f8f17ec59a.zip
arm64: traps: Add str of description to panic() in die()
Currently, there are different description strings in die() such as die("Oops",,), die("Oops - BUG",,). And panic() called by die() will always show "Fatal exception" or "Fatal exception in interrupt". Note that panic() will run any panic handler via panic_notifier_list. And the string above will be formatted and placed in static buf[] which will be passed to handler. So panic handler can not distinguish which Oops it is from the buf if we want to do some things like reserve the string in memory or panic statistics. It's not benefit to debug. We need to add more codes to troubleshoot. Let's utilize existing resource to make debug much simpler. Signed-off-by: Yue Hu <huyue2@yulong.com> Link: https://lore.kernel.org/r/20200804085347.10720-1-zbestahu@gmail.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/traps.c')
-rw-r--r--arch/arm64/kernel/traps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index 13ebd5ca2070..af25cedf54e9 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -200,9 +200,9 @@ void die(const char *str, struct pt_regs *regs, int err)
oops_exit();
if (in_interrupt())
- panic("Fatal exception in interrupt");
+ panic("%s: Fatal exception in interrupt", str);
if (panic_on_oops)
- panic("Fatal exception");
+ panic("%s: Fatal exception", str);
raw_spin_unlock_irqrestore(&die_lock, flags);