From: Ian Campbell Subject: Re: [PATCH 09/29] libxc: check for xc_vcpu_setcontext failure in xc_domain_resume_any Date: Thu, 31 Oct 2013 21:56:57 +0000 Message-ID: <1383256617.5436.152.camel@dagon.hellion.org.uk> References: <1383119525-26033-1-git-send-email-mattjd@gmail.com> <1383119525-26033-10-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-10-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: Matthew Daley Cc: Stefano Stabellini , Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2013-10-30 at 20:51 +1300, Matthew Daley wrote: > 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; The label is inside an x86 specific ifdef and therefore this breaks on ARM. > + } > > /* Ready to resume domain execution now. */ > domctl.cmd = XEN_DOMCTL_resumedomain;