From: Andres Lagar-Cavilla Subject: [PATCH 8 of 9] x86/mm: Fix checks during foreign mapping of paged pages Date: Tue, 29 Nov 2011 15:21:45 -0500 Message-ID: <3489152b3a560be744ab.1322598105@xdev.gridcentric.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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@lists.xensource.com Cc: ian.campbell@citrix.com, andres@gridcentric.ca, tim@xen.org, keir.xen@gmail.com, JBeulich@suse.com, ian.jackson@citrix.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org xen/arch/x86/mm.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Check that the valid mfn is the one we are mapping, not the mfn of the page table of the foreign domain. Signed-off-by: Andres Lagar-Cavilla diff -r 5286ed662c1e -r 3489152b3a56 xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -3572,7 +3572,8 @@ int do_mmu_update( rc = -ENOENT; break; } - else if ( p2m_ram_paging_in_start == l1e_p2mt && !mfn_valid(mfn) ) + else if ( p2m_ram_paging_in_start == l1e_p2mt && + !mfn_valid(l1emfn) ) { put_gfn(pg_owner, l1egfn); rc = -ENOENT;