All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/libxc: Set max_elem to zero in xc_lockprof_query_number()
@ 2014-08-13 16:40 Boris Ostrovsky
  2014-08-26 21:13 ` Ian Campbell
  0 siblings, 1 reply; 2+ messages in thread
From: Boris Ostrovsky @ 2014-08-13 16:40 UTC (permalink / raw)
  To: ian.jackson, stefano.stabellini, ian.campbell; +Cc: xen-devel, boris.ostrovsky

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@oracle.com>
---
 tools/libxc/xc_misc.c | 1 +
 1 file changed, 1 insertion(+)

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);
 
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-26 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-13 16:40 [PATCH] tools/libxc: Set max_elem to zero in xc_lockprof_query_number() Boris Ostrovsky
2014-08-26 21:13 ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.