aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_misc.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-23 09:52:51 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-23 09:52:51 +0100
commita3fc4d842ee8ff9de41a234d0dfc4252ea3f19ec (patch)
tree206b826018b807ed533391714457157a1b11d888 /tools/libxc/xc_misc.c
parent7aae32885d19d76db269b7231a313d3c91a1e10a (diff)
downloadxen-a3fc4d842ee8ff9de41a234d0dfc4252ea3f19ec.tar.gz
xen-a3fc4d842ee8ff9de41a234d0dfc4252ea3f19ec.tar.bz2
xen-a3fc4d842ee8ff9de41a234d0dfc4252ea3f19ec.zip
[SOLARIS] Don't mlock() hypercall buffers.
On solaris mlock requires a page aligned address and mlock doesn't ensure the pages won't minor page fault. Signed-off-by: Mark Johnson <mark.johnson@sun.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 7b598124c4..37c505e2bc 100644
--- a/tools/libxc/xc_misc.c
+++ b/tools/libxc/xc_misc.c
@@ -21,13 +21,13 @@ int xc_readconsolering(int xc_handle,
sysctl.u.readconsole.count = nr_chars;
sysctl.u.readconsole.clear = clear;
- if ( (ret = mlock(buffer, nr_chars)) != 0 )
+ if ( (ret = lock_pages(buffer, nr_chars)) != 0 )
return ret;
if ( (ret = do_sysctl(xc_handle, &sysctl)) == 0 )
*pnr_chars = sysctl.u.readconsole.count;
- safe_munlock(buffer, nr_chars);
+ unlock_pages(buffer, nr_chars);
return ret;
}