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

[Xen-changelog] [xen stable-4.5] libxl: fix libxl_set_memory_target



commit 1a2bda56b8750eab1924eae8a35316258a4a3a32
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Thu Dec 29 16:36:31 2016 +0000
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Fri Jan 20 17:38:45 2017 +0000

    libxl: fix libxl_set_memory_target
    
    Commit 26dbc93a ("libxl: Remove pointless hypercall from
    libxl_set_memory_target") removed the call to xc_domain_getinfolist, but
    it failed to notice that "info" was actually needed later.
    
    Put that back. While at it, make the code conform to coding style
    requirement.
    
    Reported-by: Juergen Gross <jgross@xxxxxxxx>
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    (cherry picked from commit ed5f19aea66fe5a72060d6a795ffcd23b7643ee3)
    (cherry picked from commit e1cefedd80f9972854769bfc6e32e23b56cd0712)
    (cherry picked from commit 013ee593ca0456e1adfdf80ef7e44b151cdb1545)
    (cherry picked from commit 3658f7a0bdd8fcda217559927e25263a07398c27)
---
 tools/libxl/libxl.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index aa39e78..910fa68 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -4937,6 +4937,13 @@ retry_transaction:
         goto out;
     }
 
+    r = xc_domain_getinfolist(ctx->xch, domid, 1, &info);
+    if (r != 1 || info.domain != domid) {
+        abort_transaction = 1;
+        rc = ERROR_FAIL;
+        goto out;
+    }
+
     libxl_dominfo_init(&ptr);
     xcinfo2xlinfo(ctx, &info, &ptr);
     uuid = libxl__uuid2string(gc, ptr.uuid);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.5

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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