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

[Xen-changelog] [xen master] libxl: check for transaction abortion failure in libxl_set_memory_target



commit 5bc3a84608de002853048ea1f36c73fbb1304154
Author:     Matthew Daley <mattjd@xxxxxxxxx>
AuthorDate: Wed Oct 30 20:51:48 2013 +1300
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu Oct 31 21:55:51 2013 +0000

    libxl: check for transaction abortion failure in libxl_set_memory_target
    
    While at it, correct the error handling of libxl__fill_dom0_memory_info;
    at that point there is no transaction to end in any manner.
    
    Coverity-ID: 1055046
    Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/libxl/libxl.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 0652010..bede011 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -3676,12 +3676,11 @@ retry_transaction:
     target = libxl__xs_read(gc, t, libxl__sprintf(gc,
                 "%s/memory/target", dompath));
     if (!target && !domid) {
-        xs_transaction_end(ctx->xsh, t, 1);
+        if (!xs_transaction_end(ctx->xsh, t, 1))
+            goto out_no_transaction;
         rc = libxl__fill_dom0_memory_info(gc, &current_target_memkb);
-        if (rc < 0) {
-            abort_transaction = 1;
-            goto out;
-        }
+        if (rc < 0)
+            goto out_no_transaction;
         goto retry_transaction;
     } else if (!target) {
         LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR,
@@ -3786,6 +3785,7 @@ out:
         if (errno == EAGAIN)
             goto retry_transaction;
 
+out_no_transaction:
     GC_FREE;
     return rc;
 }
--
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®.