]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
x86/unwind: Dump all stacks in unwind_dump()
authorJosh Poimboeuf <jpoimboe@redhat.com>
Wed, 26 Apr 2017 01:48:52 +0000 (20:48 -0500)
committerIngo Molnar <mingo@kernel.org>
Wed, 26 Apr 2017 06:19:05 +0000 (08:19 +0200)
commit262fa734a0023a43391f9bd4a4099487b8393f35
treea2282fa80d6bf3a29c7d50dc99e34c1b89be9812
parentb0d50c7b5d807ce6f7ba58e42b260e92bd7d88fb
x86/unwind: Dump all stacks in unwind_dump()

Currently unwind_dump() dumps only the most recently accessed stack.
But it has a few issues.

In some cases, 'first_sp' can get out of sync with 'stack_info', causing
unwind_dump() to start from the wrong address, flood the printk buffer,
and eventually read a bad address.

In other cases, dumping only the most recently accessed stack doesn't
give enough data to diagnose the error.

Fix both issues by dumping *all* stacks involved in the trace, not just
the last one.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 8b5e99f02264 ("x86/unwind: Dump stack data on warnings")
Link: http://lkml.kernel.org/r/016d6a9810d7d1bfc87ef8c0e6ee041c6744c909.1493171120.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/unwind_frame.c