Fix for an invalid "bt" warning on a 32-bit X86 idle (swapper) task.

Without the patch, the backtrace displays the "cannot resolve stack
trace" warning, dumps the backtrace, and then the text symbols:

  crash> bt
  PID: 0      TASK: f0962180  CPU: 6   COMMAND: "swapper/6"
  bt: cannot resolve stack trace:
   #0 [f095ff1c] __schedule at c0b6ef8d
   #1 [f095ff58] schedule at c0b6f4a9
   #2 [f095ff64] schedule_preempt_disabled at c0b6f728
   #3 [f095ff6c] cpu_startup_entry at c04b0310
   #4 [f095ff94] start_secondary at c04468c0
  bt: text symbols on stack:
      [f095ff1c] __schedule at c0b6ef8d
      [f095ff58] schedule at c0b6f4ae
      [f095ff64] schedule_preempt_disabled at c0b6f72d
      [f095ff6c] cpu_startup_entry at c04b0315
      [f095ff94] start_secondary at c04468c5
  crash>

The backtrace shown is actually correct.
(anderson@redhat.com)
This commit is contained in:
Dave Anderson 2017-02-14 16:23:56 -05:00
parent ec1a9b967d
commit 63dd57685e
1 changed files with 2 additions and 1 deletions

View File

@ -1692,7 +1692,8 @@ find_trace(
#endif
func_name = kl_funcname(pc);
if (func_name && !XEN_HYPER_MODE()) {
if (strstr(func_name, "kernel_thread")) {
if (strstr(func_name, "kernel_thread") ||
strstr(func_name, "start_secondary")) {
ra = 0;
bp = saddr - 4;
asp = (uaddr_t*)