From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Daley Subject: [PATCH 09/29] libxc: check for xc_vcpu_setcontext failure in xc_domain_resume_any Date: Wed, 30 Oct 2013 20:51:45 +1300 Message-ID: <1383119525-26033-10-git-send-email-mattjd@gmail.com> References: <1383119525-26033-1-git-send-email-mattjd@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383119525-26033-1-git-send-email-mattjd@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Matthew Daley , Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Coverity-ID: 1090352 Signed-off-by: Matthew Daley --- tools/libxc/xc_resume.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_resume.c index 50724f2..a4c0f53 100644 --- a/tools/libxc/xc_resume.c +++ b/tools/libxc/xc_resume.c @@ -211,7 +211,11 @@ 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; -- 1.7.10.4