[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3 of 3] x86/mm: Fix checks during foreign mapping of paged pages
xen/arch/x86/mm.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 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 <andres@xxxxxxxxxxxxxxxx> diff -r 4e0c533a3e1d -r 2372d2bf76b5 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; @@ -3620,7 +3621,8 @@ int do_mmu_update( rc = -ENOENT; break; } - else if ( p2m_ram_paging_in_start == l2e_p2mt && !mfn_valid(mfn) ) + else if ( p2m_ram_paging_in_start == l2e_p2mt && + !mfn_valid(l2emfn) ) { put_gfn(pg_owner, l2egfn); rc = -ENOENT; @@ -3654,7 +3656,8 @@ int do_mmu_update( rc = -ENOENT; break; } - else if ( p2m_ram_paging_in_start == l3e_p2mt && !mfn_valid(mfn) ) + else if ( p2m_ram_paging_in_start == l3e_p2mt && + !mfn_valid(l3emfn) ) { put_gfn(pg_owner, l3egfn); rc = -ENOENT; @@ -3688,7 +3691,8 @@ int do_mmu_update( rc = -ENOENT; break; } - else if ( p2m_ram_paging_in_start == l4e_p2mt && !mfn_valid(mfn) ) + else if ( p2m_ram_paging_in_start == l4e_p2mt && + !mfn_valid(l4emfn) ) { put_gfn(pg_owner, l4egfn); rc = -ENOENT; _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |