xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: libxl: cannot start guest
Date: Thu, 24 May 2012 11:44:06 +0200	[thread overview]
Message-ID: <4FBE02E6.2050807@amd.com> (raw)
In-Reply-To: <1337767872.30233.20.camel@zakaz.uk.xensource.com>

On 05/23/12 12:11, Ian Campbell wrote:

> 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.

Thank you. Ian J. what do you say?

Christoph


> 8<-----------------------------
> 
> From 6b43ca97f5f8c4fa9bf24101253af21bc66ddf96 Mon Sep 17 00:00:00 2001
> From: Christoph Egger <Christoph.Egger@amd.com>
> 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@amd.com>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>  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());



-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

  reply	other threads:[~2012-05-24  9:44 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18 13:17 libxl: cannot start guest Christoph Egger
2012-05-18 13:30 ` Ian Campbell
2012-05-18 14:23   ` Christoph Egger
2012-05-18 15:51     ` Christoph Egger
2012-05-18 15:58       ` Ian Campbell
2012-05-21 10:26         ` Christoph Egger
2012-05-21 12:15           ` Ian Campbell
2012-05-21 13:10             ` Christoph Egger
2012-05-21 13:49               ` Ian Campbell
2012-05-21 15:43                 ` Christoph Egger
2012-05-21 15:44                 ` Christoph Egger
2012-05-21 15:57                   ` Ian Campbell
2012-05-21 16:11                     ` Ian Jackson
2012-05-22 12:35                     ` Christoph Egger
2012-05-22 12:53                       ` Ian Campbell
2012-05-22 13:17                         ` Christoph Egger
2012-05-22 13:18                         ` Christoph Egger
2012-05-22 13:21                           ` Ian Campbell
2012-05-22 14:03                             ` Christoph Egger
2012-05-22 14:20                               ` Ian Campbell
2012-05-22 15:16                                 ` Christoph Egger
2012-05-22 15:21                                   ` Ian Campbell
2012-05-22 15:32                                     ` Christoph Egger
2012-05-23 10:11                                       ` Ian Campbell
2012-05-24  9:44                                         ` Christoph Egger [this message]
2012-05-25 14:56                                           ` Roger Pau Monne
2012-05-25 15:42                                             ` Ian Campbell
2012-05-29 10:02                                         ` Ian Jackson
2012-05-29 10:13                                           ` Ian Campbell
2012-05-22 13:21                           ` Christoph Egger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FBE02E6.2050807@amd.com \
    --to=christoph.egger@amd.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).