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 Segmentation fault of xend

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: Fix Segmentation fault of xend
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Jun 2010 10:45:28 -0700
Delivery-date: Mon, 21 Jun 2010 10:52:02 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1277110512 -3600
# Node ID 05e127771b86b3b58e8a20cd526c26d0896c3752
# Parent  9f257ab92ae4c07dc39b63aabd9867f179d6da25
libxc: Fix Segmentation fault of xend

If /proc/xen/privcmd cannot be opened,
start xend occurs Segmentation fault.
Add check to fix it.

Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
---
 tools/libxc/xc_private.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -r 9f257ab92ae4 -r 05e127771b86 tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c  Fri Jun 18 14:09:44 2010 +0100
+++ b/tools/libxc/xc_private.c  Mon Jun 21 09:55:12 2010 +0100
@@ -82,8 +82,10 @@ const xc_error *xc_get_last_error(xc_int
 
 void xc_clear_last_error(xc_interface *xch)
 {
-    xch->last_error.code = XC_ERROR_NONE;
-    xch->last_error.message[0] = '\0';
+    if (xch) {
+        xch->last_error.code = XC_ERROR_NONE;
+        xch->last_error.message[0] = '\0';
+    }
 }
 
 const char *xc_error_code_to_desc(int code)

_______________________________________________
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 Segmentation fault of xend, Xen patchbot-unstable <=