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] libxenlight: initialize domid to -1 in do

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxenlight: initialize domid to -1 in domain_create
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 08 Jan 2010 04:00:41 -0800
Delivery-date: Fri, 08 Jan 2010 04:02:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1262951316 0
# Node ID 182883d9acbe9a0b508eb5f1d0b406d76456f1ae
# Parent  b35974051d7e6b41b0f829452306d9eb45340dd2
libxenlight: initialize domid to -1 in domain_create

prevent call site that doesn't check return values to try to do
operation on domain 0.
instead they use domid -1, which is unlikely to exist.

Signed-off-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r b35974051d7e -r 182883d9acbe tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Fri Jan 08 11:48:02 2010 +0000
+++ b/tools/libxl/libxl.c       Fri Jan 08 11:48:36 2010 +0000
@@ -99,7 +99,7 @@ int libxl_domain_make(struct libxl_ctx *
 
     flags = info->hvm ? XEN_DOMCTL_CDF_hvm_guest : 0;
     flags |= info->hap ? XEN_DOMCTL_CDF_hap : 0;
-    *domid = 0;
+    *domid = -1;
 
     /* Ultimately, handle is an array of 16 uint8_t, same as uuid */
     memcpy(handle, info->uuid, sizeof(xen_domain_handle_t));

_______________________________________________
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] libxenlight: initialize domid to -1 in domain_create, Xen patchbot-unstable <=