xen/arm: Don't dump stack when the VCPU is offline
authorJulien Grall <julien.grall@linaro.org>
Wed, 25 Sep 2013 12:12:47 +0000 (13:12 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 26 Sep 2013 15:18:41 +0000 (16:18 +0100)
When a VCPU is not yet online, the registers contain garbagge. This will
result to call randomly BUG() in show_guest_stack.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/traps.c

index 0e9a141905738be2bfa916e420dd6f61e5d42596..4c0fc323ac4570b2aca2109e467417f16ed105a2 100644 (file)
@@ -612,6 +612,12 @@ static void show_guest_stack(struct vcpu *v, struct cpu_user_regs *regs)
     void *mapped;
     unsigned long *stack, addr;
 
+    if ( test_bit(_VPF_down, &v->pause_flags) )
+    {
+        printk("No stack trace, VCPU offline\n");
+        return;
+    }
+
     switch ( regs->cpsr & PSR_MODE_MASK )
     {
     case PSR_MODE_USR: