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] xenapi: Fix segfault in libxenapi.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenapi: Fix segfault in libxenapi.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Jun 2007 12:58:15 -0700
Delivery-date: Thu, 14 Jun 2007 15:25:21 -0700
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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1181730428 -3600
# Node ID 7f9362a8ae3daeb5dc7bc62069eae872c42a5a14
# Parent  30449e0e0a64618c29e47ed7774cd2b689711319
xenapi: Fix segfault in libxenapi.

When calling xen_vbd_set_mode(), libxenapi attempted to convert enum
mode parameter to a string twice - resulting in segfault.  Removed
first conversion since conversion is taking place in
marshalling/demarshalling layer. Fixed similar double enum conversion
in other places as well.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>
---
 tools/libxen/src/xen_vbd.c |    4 ++--
 tools/libxen/src/xen_vm.c  |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff -r 30449e0e0a64 -r 7f9362a8ae3d tools/libxen/src/xen_vbd.c
--- a/tools/libxen/src/xen_vbd.c        Wed Jun 13 11:13:11 2007 +0100
+++ b/tools/libxen/src/xen_vbd.c        Wed Jun 13 11:27:08 2007 +0100
@@ -463,7 +463,7 @@ xen_vbd_set_mode(xen_session *session, x
             { .type = &abstract_type_string,
               .u.string_val = vbd },
             { .type = &xen_vbd_mode_abstract_type_,
-              .u.string_val = xen_vbd_mode_to_string(mode) }
+              .u.enum_val = mode }
         };
 
     xen_call_(session, "VBD.set_mode", param_values, 2, NULL, NULL);
@@ -479,7 +479,7 @@ xen_vbd_set_type(xen_session *session, x
             { .type = &abstract_type_string,
               .u.string_val = vbd },
             { .type = &xen_vbd_type_abstract_type_,
-              .u.string_val = xen_vbd_type_to_string(type) }
+              .u.enum_val = type }
         };
 
     xen_call_(session, "VBD.set_type", param_values, 2, NULL, NULL);
diff -r 30449e0e0a64 -r 7f9362a8ae3d tools/libxen/src/xen_vm.c
--- a/tools/libxen/src/xen_vm.c Wed Jun 13 11:13:11 2007 +0100
+++ b/tools/libxen/src/xen_vm.c Wed Jun 13 11:27:08 2007 +0100
@@ -1142,7 +1142,7 @@ xen_vm_set_actions_after_shutdown(xen_se
             { .type = &abstract_type_string,
               .u.string_val = vm },
             { .type = &xen_on_normal_exit_abstract_type_,
-              .u.string_val = xen_on_normal_exit_to_string(after_shutdown) }
+              .u.enum_val = after_shutdown }
         };
 
     xen_call_(session, "VM.set_actions_after_shutdown", param_values, 2, NULL, 
NULL);
@@ -1158,7 +1158,7 @@ xen_vm_set_actions_after_reboot(xen_sess
             { .type = &abstract_type_string,
               .u.string_val = vm },
             { .type = &xen_on_normal_exit_abstract_type_,
-              .u.string_val = xen_on_normal_exit_to_string(after_reboot) }
+              .u.enum_val = after_reboot }
         };
 
     xen_call_(session, "VM.set_actions_after_reboot", param_values, 2, NULL, 
NULL);
@@ -1174,7 +1174,7 @@ xen_vm_set_actions_after_crash(xen_sessi
             { .type = &abstract_type_string,
               .u.string_val = vm },
             { .type = &xen_on_crash_behaviour_abstract_type_,
-              .u.string_val = xen_on_crash_behaviour_to_string(after_crash) }
+              .u.enum_val = after_crash }
         };
 
     xen_call_(session, "VM.set_actions_after_crash", param_values, 2, NULL, 
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] xenapi: Fix segfault in libxenapi., Xen patchbot-unstable <=