From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kip Macy Subject: pin ctxt in xc_domain_getfullinfo Date: Fri, 22 Apr 2005 13:49:07 -0700 Message-ID: Reply-To: Kip Macy Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/04/22 13:45:41-07:00 kmacy@curly.lab.netapp.com=20 # mlock ctxt in xc_domain_getfullinfo # this is the most general solution to the recent problem seen in xc_ptra= ce # Signed-off-by: Kip Macy #=20 # 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 #=20 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 =3D (u16)vcpu; op.u.getdomaininfo.ctxt =3D ctxt; =20 + if ( ctxt )=20 + if ( mlock(ctxt, sizeof(*ctxt)) !=3D 0 ) + return -1; + rc =3D do_dom0_op(xc_handle, &op); + =20 + if ( ctxt ) + munlock(ctxt, sizeof(*ctxt)); =20 if ( info ) memcpy(info, &op.u.getdomaininfo, sizeof(*info));