[Intel-gfx] [PATCH] kernel/panic: Show the stacktrace after additional notifier messages
Martin Peres
martin.peres at linux.intel.com
Tue Sep 4 08:55:38 UTC 2018
On 03/09/2018 16:17, Chris Wilson wrote:
> Most systems keep the last messages from the panic, and we value the
> stacktrace most, so dump it last in order to preserve it for
> post-mortems.
Thanks a lot for doing this Chris! I am hopping we'll get a lot of
usable traces out of that!
Acked-by: Martin Peres <martin.peres at linux.intel.com>
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> kernel/panic.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/kernel/panic.c b/kernel/panic.c
> index 8b2e002d52eb..c0334516cb15 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -176,13 +176,6 @@ void panic(const char *fmt, ...)
> vsnprintf(buf, sizeof(buf), fmt, args);
> va_end(args);
> pr_emerg("Kernel panic - not syncing: %s\n", buf);
> -#ifdef CONFIG_DEBUG_BUGVERBOSE
> - /*
> - * Avoid nested stack-dumping if a panic occurs during oops processing
> - */
> - if (!test_taint(TAINT_DIE) && oops_in_progress <= 1)
> - dump_stack();
> -#endif
>
> /*
> * If we have crashed and we have a crash kernel loaded let it handle
> @@ -217,6 +210,14 @@ void panic(const char *fmt, ...)
> */
> atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
>
> +#ifdef CONFIG_DEBUG_BUGVERBOSE
> + /*
> + * Avoid nested stack-dumping if a panic occurs during oops processing
> + */
> + if (!test_taint(TAINT_DIE) && oops_in_progress <= 1)
> + dump_stack();
> +#endif
> +
> /* Call flush even twice. It tries harder with a single online CPU */
> printk_safe_flush_on_panic();
> kmsg_dump(KMSG_DUMP_PANIC);
>
More information about the Intel-gfx
mailing list