# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/04/22 13:45:41-07:00 kmacy@curly.lab.netapp.com # mlock ctxt in xc_domain_getfullinfo # this is the most general solution to the recent problem seen in xc_ptrace # Signed-off-by: Kip Macy <kmacy@fsmware.com> # # tools/libxc/xc_domain.c # 2005/04/22 13:45:38-07:00 kmacy@curly.lab.netapp.com +7 -0 # mlock ctxt in xc_domain_getfullinfo # diff -Nru a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c --- a/tools/libxc/xc_domain.c 2005-04-21 13:52:32 -07:00 +++ b/tools/libxc/xc_domain.c 2005-04-21 13:52:32 -07:00 @@ -134,7 +134,14 @@ op.u.getdomaininfo.exec_domain = (u16)vcpu; op.u.getdomaininfo.ctxt = ctxt; + if ( ctxt ) + if ( mlock(ctxt, sizeof(*ctxt)) != 0 ) + return -1; + rc = do_dom0_op(xc_handle, &op); + + if ( ctxt ) + munlock(ctxt, sizeof(*ctxt)); if ( info ) memcpy(info, &op.u.getdomaininfo, sizeof(*info)); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel