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/
Home Products Support Community News


[Xen-changelog] [xen-unstable] python/xc: do not crash xend if /proc/xen

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] python/xc: do not crash xend if /proc/xen/privcmd cannot be opened
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 24 Jun 2010 14:00:17 -0700
Delivery-date: Thu, 24 Jun 2010 14:01:31 -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 Jackson <Ian.Jackson@xxxxxxxxxxxxx>
# Date 1277218808 -3600
# Node ID 2ad890d46cb8a11fc6ea329126d398021307e627
# Parent  fa809ed6f534101158645c3f99be37a121eedb02
python/xc: do not crash xend if /proc/xen/privcmd cannot be opened

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/python/xen/lowlevel/xc/xc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r fa809ed6f534 -r 2ad890d46cb8 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Tue Jun 22 15:39:42 2010 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Tue Jun 22 16:00:08 2010 +0100
@@ -72,7 +72,8 @@ static PyObject *pyxc_error_to_exception
         pyerr = Py_BuildValue("(is)", err->code, desc);
-    xc_clear_last_error(xch);
+    if (xch)
+        xc_clear_last_error(xch);
     if ( pyerr != NULL )

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] python/xc: do not crash xend if /proc/xen/privcmd cannot be opened, Xen patchbot-unstable <=