WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Check return of new_domain inside dom0_in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Check return of new_domain inside dom0_init, avoiding segfault if there is
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Dec 2006 17:35:23 +0000
Delivery-date: Wed, 13 Dec 2006 09:43:08 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Check return of new_domain inside dom0_init, avoiding segfault if there is, Xen patchbot-unstable <=