[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [mini-os master] mini-os: make dump_regs() work in early boot



commit 4133375e1c797ccacd8668410dee5744b1d437ca
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Mon Aug 22 16:01:40 2016 +0200
Commit:     Juergen Gross <jgross@xxxxxxxx>
CommitDate: Wed Aug 24 12:14:11 2016 +0200

    mini-os: make dump_regs() work in early boot
    
    dump_regs() will result in page fault in early boot as there is no
    current thread pointer. Handle this case.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
---
 arch/x86/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/traps.c b/arch/x86/traps.c
index 6353718..307a14c 100644
--- a/arch/x86/traps.c
+++ b/arch/x86/traps.c
@@ -32,7 +32,7 @@ void machine_check(void);
 
 void dump_regs(struct pt_regs *regs)
 {
-    printk("Thread: %s\n", current->name);
+    printk("Thread: %s\n", current ? current->name : "*NONE*");
 #ifdef __i386__    
     printk("EIP: %lx, EFLAGS %lx.\n", regs->eip, regs->eflags);
     printk("EBX: %08lx ECX: %08lx EDX: %08lx\n",
--
generated by git-patchbot for /home/xen/git/mini-os.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.