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

[Xen-changelog] [xen-unstable] Check return of new_domain inside dom0_init, avoiding segfault if there is



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID e2792d1612b33b4cda7d81f70c66642291b4bc8c
# Parent  dd6bbf10e79a32eed3f33a06c9cc68d393e806cd
Check return of new_domain inside dom0_init, avoiding segfault if there is
a second instance of xenstored running (and we're using different pid files).

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/xenstore/xenstored_domain.c |    2 ++
 1 files changed, 2 insertions(+)

diff -r dd6bbf10e79a -r e2792d1612b3 tools/xenstore/xenstored_domain.c
--- a/tools/xenstore/xenstored_domain.c Sat Dec 09 19:24:46 2006 +0000
+++ b/tools/xenstore/xenstored_domain.c Wed Dec 13 11:13:08 2006 +0000
@@ -459,6 +459,8 @@ static int dom0_init(void)
                return -1;
 
        dom0 = new_domain(NULL, 0, port); 
+       if (dom0 == NULL)
+               return -1;
 
        dom0->interface = xenbus_map();
        if (dom0->interface == NULL)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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