aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_misc.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2010-10-18 16:53:04 +0100
committerIan Campbell <ian.campbell@citrix.com>2010-10-18 16:53:04 +0100
commitf5c808b428244f42b2310ddf173c624d9a2a842c (patch)
tree2ed581ac9e4a081f717ca720c76a52adfdda4078 /tools/libxc/xc_misc.c
parente43181a5eb45bf8834a703b8601f93b610ec94ab (diff)
downloadxen-f5c808b428244f42b2310ddf173c624d9a2a842c.tar.gz
xen-f5c808b428244f42b2310ddf173c624d9a2a842c.tar.bz2
xen-f5c808b428244f42b2310ddf173c624d9a2a842c.zip
libxc: use correct size of struct xen_mc
We want the size of the struct not the pointer (although rounding up to page size in lock_pages probably saves us). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxc/xc_misc.c')
-rw-r--r--tools/libxc/xc_misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c
index a5f179a403..47acdb2fb8 100644
--- a/tools/libxc/xc_misc.c
+++ b/tools/libxc/xc_misc.c
@@ -153,7 +153,7 @@ int xc_mca_op(xc_interface *xch, struct xen_mc *mc)
DECLARE_HYPERCALL;
mc->interface_version = XEN_MCA_INTERFACE_VERSION;
- if ( lock_pages(xch, mc, sizeof(mc)) )
+ if ( lock_pages(xch, mc, sizeof(*mc)) )
{
PERROR("Could not lock xen_mc memory");
return -EINVAL;
@@ -162,7 +162,7 @@ int xc_mca_op(xc_interface *xch, struct xen_mc *mc)
hypercall.op = __HYPERVISOR_mca;
hypercall.arg[0] = (unsigned long)mc;
ret = do_xen_hypercall(xch, &hypercall);
- unlock_pages(xch, mc, sizeof(mc));
+ unlock_pages(xch, mc, sizeof(*mc));
return ret;
}
#endif