[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] xen/x86: make __direct_remap_pfn_range()'s return value meaningful
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1284395993 -3600 # Node ID 0051d294bb60fc096849df586d56a389e32650d4 # Parent e8f97b92d307c6786992bb118dddc6f3466bfd01 xen/x86: make __direct_remap_pfn_range()'s return value meaningful From: Olaf Hering <ohering@xxxxxxxxxx> This change fixes the xc_map_foreign_bulk interface, which would otherwise cause SIGBUS when pages are gone because -ENOENT is not returned as expected by the IOCTL_PRIVCMD_MMAPBATCH_V2 ioctl. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> --- arch/i386/mm/ioremap-xen.c | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-) diff -r e8f97b92d307 -r 0051d294bb60 arch/i386/mm/ioremap-xen.c --- a/arch/i386/mm/ioremap-xen.c Mon Sep 13 17:38:36 2010 +0100 +++ b/arch/i386/mm/ioremap-xen.c Mon Sep 13 17:39:53 2010 +0100 @@ -45,7 +45,7 @@ static int __direct_remap_pfn_range(stru pgprot_t prot, domid_t domid) { - int rc; + int rc = 0; unsigned long i, start_address; mmu_update_t *u, *v, *w; @@ -65,8 +65,8 @@ static int __direct_remap_pfn_range(stru direct_remap_area_pte_fn, &w); if (rc) goto out; - rc = -EFAULT; - if (HYPERVISOR_mmu_update(u, v - u, NULL, domid) < 0) + rc = HYPERVISOR_mmu_update(u, v - u, NULL, domid); + if (rc < 0) goto out; v = w = u; start_address = address; @@ -90,12 +90,8 @@ static int __direct_remap_pfn_range(stru direct_remap_area_pte_fn, &w); if (rc) goto out; - rc = -EFAULT; - if (unlikely(HYPERVISOR_mmu_update(u, v - u, NULL, domid) < 0)) - goto out; - } - - rc = 0; + rc = HYPERVISOR_mmu_update(u, v - u, NULL, domid); + } out: flush_tlb_all(); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |