From: Julien Grall Date: Mon, 9 Dec 2013 18:34:10 +0000 (+0000) Subject: xen/arm: Fix regression after commit d963923 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5779 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3a5767a869cc7c6a1072014fc03a7b7ba3f92bc0;p=xen.git xen/arm: Fix regression after commit d963923 The commit d963923 "xen: arm: correct return value of raw_copy_{to/from}_guest_*, raw_clear_guest" doesn't permit to boot guest on Xen ARM. Remove the stray semicolon from the end of the if statement. Also we want to get the right rc in the error arrays, so we need to do the copy_to_guest_offset before checking the rc returned by xenmem_add_to_physmap_one. Signed-off-by: Julien Grall Acked-by: Ian Campbell [ ijc -- expanded commit log ] --- diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 26ca58873a..654281afd3 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -1084,16 +1084,17 @@ static int xenmem_add_to_physmap_range(struct domain *d, rc = xenmem_add_to_physmap_one(d, xatpr->space, xatpr->foreign_domid, idx, gpfn); - if ( rc < 0 ) - goto out; if ( unlikely(copy_to_guest_offset(xatpr->errs, - xatpr->size-1, &rc, 1)) ); + xatpr->size-1, &rc, 1)) ) { rc = -EFAULT; goto out; } + if ( rc < 0 ) + goto out; + xatpr->size--; /* Check for continuation if it's not the last interation */