[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 05 of 24] libxc: use correct size of struct xen_mc
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1283779691 -3600 # Node ID b4aa42793b8a8434aa3d7371e22e86dcca4f5a7a # Parent 8ad75cd961a081ce4ba60c97899b13112d7a5f3f 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@xxxxxxxxxx> diff -r 8ad75cd961a0 -r b4aa42793b8a tools/libxc/xc_misc.c --- a/tools/libxc/xc_misc.c Mon Sep 06 14:28:11 2010 +0100 +++ b/tools/libxc/xc_misc.c Mon Sep 06 14:28:11 2010 +0100 @@ -153,7 +153,7 @@ int xc_mca_op(xc_interface *xch, struct 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 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |