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

[Xen-changelog] [xen-3.4-testing] x86: XENMEM_add_to_physmap should propagate errors from



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1259910898 0
# Node ID 13c5436cf6a70d4a7bfe6e3884db333646fd76c0
# Parent  3accd87a8a50f27f52e63e7bd48348177d8283ae
x86: XENMEM_add_to_physmap should propagate errors from
guest_physmap_add_page().

Authored-by: David Lively
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
xen-unstable changeset:   20576:ecda56356037
xen-unstable date:        Fri Dec 04 06:59:33 2009 +0000
---
 xen/arch/x86/mm.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r 3accd87a8a50 -r 13c5436cf6a7 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Wed Dec 02 18:49:32 2009 +0000
+++ b/xen/arch/x86/mm.c Fri Dec 04 07:14:58 2009 +0000
@@ -3861,6 +3861,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
         struct xen_add_to_physmap xatp;
         unsigned long prev_mfn, mfn = 0, gpfn;
         struct domain *d;
+        int rc;
 
         if ( copy_from_guest(&xatp, arg, 1) )
             return -EFAULT;
@@ -3932,7 +3933,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
             guest_physmap_remove_page(d, gpfn, mfn, 0);
 
         /* Map at new location. */
-        guest_physmap_add_page(d, xatp.gpfn, mfn, 0);
+        rc = guest_physmap_add_page(d, xatp.gpfn, mfn, 0);
 
         domain_unlock(d);
 
@@ -3941,7 +3942,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
 
         rcu_unlock_domain(d);
 
-        break;
+        return rc;
     }
 
     case XENMEM_set_memory_map:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
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®.