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

[Xen-changelog] [xen stable-4.4] common/memory: fix an XSM error path



commit f9c133f3cc8010b460ffc386874825ffaf646239
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Feb 3 12:30:59 2015 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Feb 3 12:30:59 2015 +0100

    common/memory: fix an XSM error path
    
    XENMEM_{in,de}crease_reservation as well as XENMEM_populate_physmap
    return the extent at which failure was detected, not error indicators.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
    Acked-by: Tim Deegan <tim@xxxxxxx>
    master commit: 76d4ff26d9647088353acaf4a56388a354a5d6e9
    master date: 2015-01-19 11:59:05 +0100
---
 xen/common/memory.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/common/memory.c b/xen/common/memory.c
index 4d6ffee..38f79b3 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -744,11 +744,10 @@ long do_memory_op(unsigned long cmd, 
XEN_GUEST_HANDLE_PARAM(void) arg)
             return start_extent;
         args.domain = d;
 
-        rc = xsm_memory_adjust_reservation(XSM_TARGET, current->domain, d);
-        if ( rc )
+        if ( xsm_memory_adjust_reservation(XSM_TARGET, current->domain, d) )
         {
             rcu_unlock_domain(d);
-            return rc;
+            return start_extent;
         }
 
         switch ( op )
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

_______________________________________________
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®.