panic: call panic handlers before kmsg_dump
PATCH 1/1 panic: call panic handlers before kmsg_dump
Since the panic handlers may produce additional information (via printk) for the kernel log, it should be reported as part of the panic output saved by kmsg_dump(). Without this re-ordering, nothing that adds information to a panic will show up in pstore's view when kmsg_dump runs, and is therefore not visible to crash reporting tools that examine pstore output.
--- kernel/panic.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
kernel/panic.c +6 -2
@@ -123,10 +123,14 @@ void panic(const char *fmt, ...)*/ smp_send_stop (); -kmsg_dump (KMSG_DUMP_PANIC ); - +/* +* Run any panic handlers, including those that might need to +* add information to the kmsg dump output. +*/ atomic_notifier_call_chain (&panic_notifier_list,0 , buf); +kmsg_dump (KMSG_DUMP_PANIC ); +bust_spinlocks (0 );if (!panic_blink)
Signature · 6 lines
1.7.9.5 -- Kees Cook Chrome OS Security
Quoted 6 lines · Kees Cook
Since the panic handlers may produce additional information (via printk) for the kernel log, it should be reported as part of the panic output saved by
kmsg_dump(). Without this re-ordering, nothing that adds information to a panic will show up in pstore's view whenkmsg_dumpruns, and is therefore not visible to crash reporting tools that examine pstore output.
Good point.
Quoted 11 lines · Tony Luck
Quoted 6 lines · Kees Cook
Since the panic handlers may produce additional information (via printk) for the kernel log, it should be reported as part of the panic output saved by
kmsg_dump(). Without this re-ordering, nothing that adds information to a panic will show up in pstore's view whenkmsg_dumpruns, and is therefore not visible to crash reporting tools that examine pstore output.Good point.
Acked-by Tony Luck <[email protected]>
Can someone pick this patch up? If akpm doesn't want it, it could live in the pstore tree maybe?
-Kees
Signature · 2 lines
Kees Cook Chrome OS Security
Quoted 9 lines · Kees Cook
Quoted 8 lines · Tony Luck
Quoted 6 lines · Kees Cook
Since the panic handlers may produce additional information (via printk) for the kernel log, it should be reported as part of the panic output saved by
kmsg_dump(). Without this re-ordering, nothing that adds information to a panic will show up in pstore's view whenkmsg_dumpruns, and is therefore not visible to crash reporting tools that examine pstore output.
Quoted 6 lines
Quoted 3 lines
Good point.
Acked-by Tony Luck <[email protected]>Can someone pick this patch up? If akpm doesn't want it, it could live in the pstore tree maybe?
Ah, sorry, it seems like it is already in -mm. Never mind!
-Kees
Signature · 2 lines
Kees Cook Chrome OS Security