|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] libxl: cannot start guest
On Tue, 2012-05-22 at 16:32 +0100, Christoph Egger wrote:
> On 05/22/12 17:21, Ian Campbell wrote:
>
> > On Tue, 2012-05-22 at 16:16 +0100, Christoph Egger wrote:
> >> On 05/22/12 16:20, Ian Campbell wrote:
> >>> All the >= checks on *xcg_handle seem wrong to me. Really they should be
> >>> checking != NULL, since otherwise they don't actually discriminate the
> >>> two cases! Does making that change help?
> >>
> >> Yes, that helps! I can start guests again.
> >
> > Excellent, I assume you are going to submit the patch (i.e. I don't need
> > to..)
>
> Yes, patch attached.
I fixed up the commit message as follows. I'll apply if IanJ agrees or
acks it.
8<-----------------------------
>From 6b43ca97f5f8c4fa9bf24101253af21bc66ddf96 Mon Sep 17 00:00:00 2001
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Tue, 22 May 2012 17:32:21 +0200
Subject: [PATCH] xenstore: fix crash on platforms with no gntdev driver
implementation.
Fix pointer checks introduced in changeset 24757:aae516b78fce.
Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
tools/xenstore/xenstored_domain.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/xenstore/xenstored_domain.c
b/tools/xenstore/xenstored_domain.c
index f8c822f..bf83d58 100644
--- a/tools/xenstore/xenstored_domain.c
+++ b/tools/xenstore/xenstored_domain.c
@@ -167,7 +167,7 @@ static int readchn(struct connection *conn, void *data,
unsigned int len)
static void *map_interface(domid_t domid, unsigned long mfn)
{
- if (*xcg_handle >= 0) {
+ if (*xcg_handle != NULL) {
/* this is the preferred method */
return xc_gnttab_map_grant_ref(*xcg_handle, domid,
GNTTAB_RESERVED_XENSTORE, PROT_READ|PROT_WRITE);
@@ -179,7 +179,7 @@ static void *map_interface(domid_t domid, unsigned long mfn)
static void unmap_interface(void *interface)
{
- if (*xcg_handle >= 0)
+ if (*xcg_handle != NULL)
xc_gnttab_munmap(*xcg_handle, interface, 1);
else
munmap(interface, getpagesize());
--
1.7.2.5
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |