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

[Xen-changelog] [xen master] tools/libxc: Set max_elem to zero in xc_lockprof_query_number()



commit 355ed81e1a6ec3987194023d2538a3c4e5d1619d
Author:     Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
AuthorDate: Wed Aug 13 12:40:38 2014 -0400
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Aug 26 22:03:17 2014 +0100

    tools/libxc: Set max_elem to zero in xc_lockprof_query_number()
    
    If max_elem is not zero then hypervisor's spinlock_profile_ucopy_elem()
    will attempt to copy profile data into user's data buffer. Since this
    buffer is explicitly set to (the equivalent of) NULL the copy will fail,
    causing xenlockprof to fail as well.
    
    Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/libxc/xc_misc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c
index 4143de6..e253a58 100644
--- a/tools/libxc/xc_misc.c
+++ b/tools/libxc/xc_misc.c
@@ -320,6 +320,7 @@ int xc_lockprof_query_number(xc_interface *xch,
     DECLARE_SYSCTL;
 
     sysctl.cmd = XEN_SYSCTL_lockprof_op;
+    sysctl.u.lockprof_op.max_elem = 0;
     sysctl.u.lockprof_op.cmd = XEN_SYSCTL_LOCKPROF_query;
     set_xen_guest_handle(sysctl.u.lockprof_op.data, HYPERCALL_BUFFER_NULL);
 
--
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®.