[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Fix bugs in xc_exchange_page
Followed patch fix wrong usage for pfn_type. Otherwise xc_exchange_page is sure to seg fault. Thanks Yunhong, Jiang The pfn_type is indexed by gpfn, not mfn. Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx> diff -r 02003bee3e80 tools/libxc/xc_offline_page.c --- a/tools/libxc/xc_offline_page.c Thu Jun 25 18:31:10 2009 +0100 +++ b/tools/libxc/xc_offline_page.c Thu Jul 02 00:55:41 2009 +0800 @@ -583,7 +583,7 @@ int xc_exchange_page(int xc_handle, int /* Don't exchange CR3 for PAE guest in PAE host environment */ if (minfo.guest_width > sizeof(long)) { - if ( (minfo.pfn_type[mfn] & XEN_DOMCTL_PFINFO_LTABTYPE_MASK) == + if ( (minfo.pfn_type[gpfn] & XEN_DOMCTL_PFINFO_LTABTYPE_MASK) == XEN_DOMCTL_PFINFO_L3TAB ) goto failed; } @@ -621,7 +621,7 @@ int xc_exchange_page(int xc_handle, int old_ptes.cur = 0; /* Unpin the page if it is pined */ - if (minfo.pfn_type[mfn] & XEN_DOMCTL_PFINFO_LPINTAB) + if (minfo.pfn_type[gpfn] & XEN_DOMCTL_PFINFO_LPINTAB) { mops.cmd = MMUEXT_UNPIN_TABLE; mops.arg1.mfn = mfn; Attachment:
xc_exchange.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |