[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen/arm: Fix regression after commit d963923



commit 3a5767a869cc7c6a1072014fc03a7b7ba3f92bc0
Author:     Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Mon Dec 9 18:34:10 2013 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Dec 10 09:27:36 2013 +0000

    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 <julien.grall@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    [ ijc -- expanded commit log ]
---
 xen/arch/arm/mm.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 26ca588..654281a 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 */
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.