xenctx: Clean up stack trace when hypercall_page not in symbol table
authorDon Slutz <Don@CloudSwitch.com>
Thu, 3 Apr 2014 19:06:53 +0000 (15:06 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 4 Apr 2014 08:28:06 +0000 (09:28 +0100)
Before:

Call Trace:
  [<ffffffff8006b2b0>] default_idle+0x29  <--
  [<ffffffff80048d19>] cpu_idle+0x95
  [<ffffffff803e7801>] start_kernel+0x220
  [<0000000000000000>] startup_64+0x80000000
  [<ffffffff803e722f>] x86_64_start_kernel+0x22f
  [<0000000000000000>] startup_64+0x80000000
  [<0000000000000000>] startup_64+0x80000000
  [<0000000000000000>] startup_64+0x80000000
  [<0000000000000000>] startup_64+0x80000000

After:

Call Trace:
  [<ffffffff8006b2b0>] default_idle+0x29  <--
  [<ffffffff80048d19>] cpu_idle+0x95
  [<ffffffff803e7801>] start_kernel+0x220
  [<ffffffff803e722f>] x86_64_start_kernel+0x22f

Signed-off-by: Don Slutz <Don@CloudSwitch.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
tools/xentrace/xenctx.c

index 889f788003346c09e2747da016c5e51b8d53aeab..134cf5594d578ad48669f0989f37180f0ba1f57c 100644 (file)
@@ -85,8 +85,9 @@ static int is_kernel_text(guest_word_t addr)
     if (addr >= kernel_stext &&
         addr <= kernel_etext)
         return 1;
-    if (addr >= kernel_hypercallpage &&
-        addr <= kernel_hypercallpage + 4096)
+    if ( kernel_hypercallpage &&
+         (addr >= kernel_hypercallpage &&
+          addr <= kernel_hypercallpage + 4096) )
         return 1;
     if (addr >= kernel_sinittext &&
         addr <= kernel_einittext)