diff options
Diffstat (limited to 'tools/libxc/xc_evtchn.c')
-rw-r--r-- | tools/libxc/xc_evtchn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/libxc/xc_evtchn.c b/tools/libxc/xc_evtchn.c index 8192a73c4b..8c795bce7a 100644 --- a/tools/libxc/xc_evtchn.c +++ b/tools/libxc/xc_evtchn.c @@ -18,16 +18,16 @@ static int do_evtchn_op(int xc_handle, int cmd, void *arg, size_t arg_size) hypercall.arg[0] = cmd; hypercall.arg[1] = (unsigned long)arg; - if ( mlock(arg, arg_size) != 0 ) + if ( lock_pages(arg, arg_size) != 0 ) { - PERROR("do_evtchn_op: arg mlock failed"); + PERROR("do_evtchn_op: arg lock failed"); goto out; } if ((ret = do_xen_hypercall(xc_handle, &hypercall)) < 0) ERROR("do_evtchn_op: HYPERVISOR_event_channel_op failed: %d", ret); - safe_munlock(arg, arg_size); + unlock_pages(arg, arg_size); out: return ret; } |