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.
Showing the changes to kernel (1 of 1 file). Show all
Unified · Split
| @@ -123,10 +123,14 @@ void panic(const char *fmt, ...) · 122 unmodified lines | ||
| 123 | 123 | */ |
| 124 | 124 | smp_send_stop(); |
| 125 | 125 | |
| 126 | − kmsg_dump(KMSG_DUMP_PANIC); | |
| 127 | − | |
| 126 | + /* | |
| 127 | + * Run any panic handlers, including those that might need to | |
| 128 | + * add information to the kmsg dump output. | |
| 129 | + */ | |
| 128 | 130 | atomic_notifier_call_chain(&panic_notifier_list, 0, buf); |
| 129 | 131 | |
| 132 | + kmsg_dump(KMSG_DUMP_PANIC); | |
| 133 | + | |
| 130 | 134 | bust_spinlocks(0); |
| 131 | 135 | |
| 132 | 136 | if (!panic_blink) |