xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xen.org
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH 2/2] libxl: do not blunder on if bootloader fails
Date: Fri, 20 Jul 2012 19:18:30 +0100	[thread overview]
Message-ID: <1342808310-25480-3-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1342808310-25480-1-git-send-email-ian.jackson@eu.citrix.com>

If the bootloader failed, we would call the creation failure callback
but _also_ blunder on trying to recreate the domain, due to a missing
"return".

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reported-by: Roger Pau Monne <roger.pau@citrix.com>
---
 tools/libxl/libxl_create.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 294a73f..0bfa8ba 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -672,7 +672,10 @@ static void domcreate_bootloader_done(libxl__egc *egc,
     libxl__srm_restore_autogen_callbacks *const callbacks =
         &dcs->shs.callbacks.restore.a;
 
-    if (rc) domcreate_rebuild_done(egc, dcs, rc);
+    if (rc) {
+        domcreate_rebuild_done(egc, dcs, rc);
+        return;
+    }
 
     /* consume bootloader outputs. state->pv_{kernel,ramdisk} have
      * been initialised by the bootloader already.
-- 
1.7.2.5

  parent reply	other threads:[~2012-07-20 18:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 18:18 [PATCH 0/2] libxl: event fixes for Roger Ian Jackson
2012-07-20 18:18 ` [PATCH 1/2] libxl: fix reentrancy hazard in fd event processing Ian Jackson
2012-07-25 16:05   ` Ian Campbell
2012-07-25 16:10     ` Ian Jackson
2012-07-25 16:33       ` Ian Campbell
2012-07-26 14:04         ` Ian Jackson
2012-07-26 16:23           ` Ian Campbell
2012-07-25 16:49     ` Roger Pau Monne
2012-07-20 18:18 ` Ian Jackson [this message]
2012-07-23 11:09   ` [PATCH 2/2] libxl: do not blunder on if bootloader fails Ian Campbell
2012-07-23 12:13     ` Ian Campbell
2012-07-20 18:22 ` [PATCH 0/2] libxl: event fixes for Roger Ian Jackson

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=1342808310-25480-3-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --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).