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] libxc: fix xc_version by handling all kno

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: fix xc_version by handling all known command types.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 Oct 2010 19:16:09 -0700
Delivery-date: Wed, 27 Oct 2010 19:20:50 -0700
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 Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1288178668 -3600
# Node ID 28a16074681582f1209c9077f870ccf44927133e
# Parent  cd193fa265b88bf4ff891f03c9be0e12415e6778
libxc: fix xc_version by handling all known command types.

xend was crashing since 22289:ca4a781c8ae8 due to missing handling of
XENVER_commandline.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/libxc/xc_private.c |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletion(-)

diff -r cd193fa265b8 -r 28a160746815 tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c  Tue Oct 26 12:22:52 2010 +0100
+++ b/tools/libxc/xc_private.c  Wed Oct 27 12:24:28 2010 +0100
@@ -447,11 +447,14 @@ int xc_version(xc_interface *xch, int cm
 int xc_version(xc_interface *xch, int cmd, void *arg)
 {
     DECLARE_HYPERCALL_BOUNCE(arg, 0, XC_HYPERCALL_BUFFER_BOUNCE_OUT); /* Size 
unknown until cmd decoded */
-    size_t sz = 0;
+    size_t sz;
     int rc;
 
     switch ( cmd )
     {
+    case XENVER_version:
+        sz = 0;
+        break;
     case XENVER_extraversion:
         sz = sizeof(xen_extraversion_t);
         break;
@@ -467,6 +470,21 @@ int xc_version(xc_interface *xch, int cm
     case XENVER_platform_parameters:
         sz = sizeof(xen_platform_parameters_t);
         break;
+    case XENVER_get_features:
+        sz = sizeof(xen_feature_info_t);
+        break;
+    case XENVER_pagesize:
+        sz = 0;
+        break;
+    case XENVER_guest_handle:
+        sz = sizeof(xen_domain_handle_t);
+        break;
+    case XENVER_commandline:
+        sz = sizeof(xen_commandline_t);
+        break;
+    default:
+        ERROR("xc_version: unknown command %d\n", cmd);
+        return -EINVAL;
     }
 
     HYPERCALL_BOUNCE_SET_SIZE(arg, sz);

_______________________________________________
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] libxc: fix xc_version by handling all known command types., Xen patchbot-unstable <=