xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Daley <mattjd@gmail.com>
To: xen-devel@lists.xen.org
Cc: Matthew Daley <mattjd@gmail.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH v2] libxc: check for xc_vcpu_setcontext failure in xc_domain_resume_any
Date: Fri,  1 Nov 2013 13:27:32 +1300	[thread overview]
Message-ID: <1383265652-10692-1-git-send-email-mattjd@gmail.com> (raw)
In-Reply-To: <1383256617.5436.152.camel@dagon.hellion.org.uk>

Coverity-ID: 1090352
Signed-off-by: Matthew Daley <mattjd@gmail.com>
---
v2: Move 'out' label out of x86 #ifdef region

 tools/libxc/xc_resume.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_resume.c
index 50724f2..18b4818 100644
--- a/tools/libxc/xc_resume.c
+++ b/tools/libxc/xc_resume.c
@@ -211,15 +211,19 @@ static int xc_domain_resume_any(xc_interface *xch, uint32_t domid)
 
     /* Reset all secondary CPU states. */
     for ( i = 1; i <= info.max_vcpu_id; i++ )
-        xc_vcpu_setcontext(xch, domid, i, NULL);
+        if ( xc_vcpu_setcontext(xch, domid, i, NULL) != 0 )
+        {
+            ERROR("Couldn't reset vcpu state");
+            goto out;
+        }
 
     /* Ready to resume domain execution now. */
     domctl.cmd = XEN_DOMCTL_resumedomain;
     domctl.domain = domid;
     rc = do_domctl(xch, &domctl);
 
+out:
 #if defined(__i386__) || defined(__x86_64__)
- out:
     if (p2m)
         munmap(p2m, P2M_FL_ENTRIES*PAGE_SIZE);
     if (p2m_frame_list)
-- 
1.7.10.4

  reply	other threads:[~2013-11-01  0:27 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30  7:51 Fixes for various minor Coverity issues, volume 3 Matthew Daley
2013-10-30  7:51 ` [PATCH 01/29] libxc: check for xc_domain_get_guest_width failure and pass it down Matthew Daley
2013-10-31 21:03   ` Ian Campbell
2013-11-01  0:24     ` [PATCH v2] " Matthew Daley
2013-11-01 13:12       ` Ian Campbell
2013-11-02 22:57         ` [PATCH v3] libxc: check for various libxc failures and pass them down Matthew Daley
2013-11-02 23:08           ` [PATCH v4] " Matthew Daley
2013-11-04 17:31             ` Ian Campbell
2013-11-05  4:58               ` Matthew Daley
2013-11-05 10:10                 ` Ian Campbell
2013-10-30  7:51 ` [PATCH 02/29] libxc: fix retrieval of and remove pointless check on gzip size Matthew Daley
2013-10-30 10:50   ` Andrew Cooper
2013-10-30 22:08     ` Matthew Daley
2013-10-31  2:58   ` [PATCH v2] " Matthew Daley
2013-10-31 10:22     ` Andrew Cooper
2013-10-31 22:07       ` Ian Campbell
2013-10-30  7:51 ` [PATCH 03/29] libxc: fix memory leak in move_l3_below_4G error handling Matthew Daley
2013-10-30  7:51 ` [PATCH 04/29] libxc: don't ignore fd read failures when restoring a domain Matthew Daley
2013-10-30  7:51 ` [PATCH 05/29] libxc: tidy up loop construct in write_compressed Matthew Daley
2013-10-30  7:51 ` [PATCH 06/29] libxc: don't read uninitialized size value in xc_read_image Matthew Daley
2013-10-31 21:22   ` Ian Campbell
2013-10-31 22:12     ` Matthew Daley
2013-10-31 22:26       ` Ian Campbell
2013-10-30  7:51 ` [PATCH 07/29] libxc: remove pointless null pointer check in xc_interface_open_common Matthew Daley
2013-10-30  7:51 ` [PATCH 08/29] libxc: check for xc_domain_get_guest_width failure in xc_domain_resume_any Matthew Daley
2013-10-30  7:51 ` [PATCH 09/29] libxc: check for xc_vcpu_setcontext " Matthew Daley
2013-10-31 21:56   ` Ian Campbell
2013-11-01  0:27     ` Matthew Daley [this message]
2013-11-01 13:26       ` [PATCH v2] " Ian Campbell
2013-11-01 16:34     ` [PATCH 09/29] " Ian Jackson
2013-11-04 10:29       ` Ian Campbell
2013-10-30  7:51 ` [PATCH 10/29] libxc: initalize stdio loggers' progress_last_percent values to 0 Matthew Daley
2013-10-30  7:51 ` [PATCH 11/29] libxc: remove null pointer checks in xc_pm_get_{c, p}xstat Matthew Daley
2013-10-30  7:51 ` [PATCH 12/29] libxl: check for transaction abortion failure in libxl_set_memory_target Matthew Daley
2013-10-30  7:51 ` [PATCH 13/29] libxl: check for xc_domain_max_vcpus failure in libxl__build_pre Matthew Daley
2013-10-31 21:29   ` Ian Campbell
2013-11-01  0:29     ` [PATCH v2] " Matthew Daley
2013-11-01 13:27       ` Ian Campbell
2013-10-30  7:51 ` [PATCH 14/29] libxl: don't leak xs_read results in libxl__device_nic_from_xs_be Matthew Daley
2013-10-30  8:58   ` Roger Pau Monné
2013-10-30  9:51     ` Matthew Daley
2013-10-31 21:31       ` Ian Campbell
2013-10-30  7:51 ` [PATCH 15/29] libxl: correct file open success check in libxl__device_pci_reset Matthew Daley
2013-10-30  7:51 ` [PATCH 16/29] libxl: check for xc_domain_shutdown failure in libxl__domain_suspend_common_callback Matthew Daley
2013-10-31 21:36   ` Ian Campbell
2013-11-01  0:30     ` [PATCH v2] " Matthew Daley
2013-11-01 13:27       ` Ian Campbell
2013-10-30  7:51 ` [PATCH 17/29] libxl: don't leak memory in libxl__poller_get failure case Matthew Daley
2013-10-30  7:51 ` [PATCH 18/29] libxl: only close fds which successfully opened in libxl__spawn_local_dm Matthew Daley
2013-10-30  7:51 ` [PATCH 19/29] xl: libxl_list_vm returns a pointer, not a handle Matthew Daley
2013-10-30  7:51 ` [PATCH 20/29] xl: check for restore file open failure in create_domain Matthew Daley
2013-10-30  7:51 ` [PATCH 21/29] xl: remove needless infinite-loop construct " Matthew Daley
2013-10-30  7:51 ` [PATCH 22/29] xl: correct references to long-removed function in error messages Matthew Daley
2013-10-30  7:51 ` [PATCH 23/29] docs: make `xl vcpu-list` example use verbatim formatting Matthew Daley
2013-10-30 10:53   ` Matthew Daley
2013-10-31  3:02   ` [PATCH v2] docs: make `xl vm-list` " Matthew Daley
2013-10-30  7:52 ` [PATCH 24/29] libvchan: handle libxc evtchn failures properly in init functions Matthew Daley
2013-10-30 10:12   ` Matthew Daley
2013-10-30 14:52     ` Daniel De Graaf
2013-10-30 22:07       ` Matthew Daley
2013-10-30 22:17         ` Matthew Daley
2013-10-31  3:41   ` [PATCH v2] " Matthew Daley
2013-10-30  7:52 ` [PATCH 25/29] libvchan: check for fcntl failures in select-type sample application Matthew Daley
2013-10-30 17:06   ` Daniel De Graaf
2013-10-30 17:13     ` Andrew Cooper
2013-10-30 22:04     ` Matthew Daley
2013-10-31  3:44   ` [PATCH v2] libvchan: tidy up usages of fcntl " Matthew Daley
2013-10-31 21:47     ` Ian Campbell
2013-11-01  0:33       ` [PATCH v3] " Matthew Daley
2013-11-01 13:28         ` Ian Campbell
2013-11-01 14:11           ` Daniel De Graaf
2013-11-04 17:51             ` Ian Campbell
2013-10-30  7:52 ` [PATCH 26/29] xenctx: only alloc symbol if we are inserting it into the symbol table Matthew Daley
2013-10-30  8:59   ` Jan Beulich
2013-10-30  7:52 ` [PATCH 27/29] xenctx: correct error check when opening libxc Matthew Daley
2013-10-30 12:48   ` George Dunlap
2013-10-30  7:52 ` [PATCH 28/29] xentrace: don't try to close null libxc handle in disable_tbufs Matthew Daley
2013-10-30 12:47   ` George Dunlap
2013-10-30  7:52 ` [PATCH 29/29] xentrace: undeadify invalid option argument handling Matthew Daley
2013-10-30 12:47   ` George Dunlap
2013-10-31 12:28 ` Fixes for various minor Coverity issues, volume 3 Andrew Cooper
2013-10-31 21:55   ` Matthew Daley
2013-10-31 22:10   ` Ian Campbell
2013-11-01  2:08     ` Matthew Daley

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=1383265652-10692-1-git-send-email-mattjd@gmail.com \
    --to=mattjd@gmail.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@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).