From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adin Scannell Subject: [PATCH 1/3] Make xen_remap_domain_mfn_range return value meaningful in case of error Date: Fri, 16 Dec 2011 22:22:19 -0500 Message-ID: <1324092141-9730-2-git-send-email-adin@scannell.ca> References: <1324092141-9730-1-git-send-email-adin@scannell.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1324092141-9730-1-git-send-email-adin@scannell.ca> 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: olaf@aepfle.de, Adin Scannell , andres@gridcentric.ca, JBeulich@suse.com, konrad@darnok.org, adin@gridcentric.com List-Id: xen-devel@lists.xenproject.org Original patch from Olaf Hering 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 This is a port to the mainline Linux tree. Functions were refactored and renamed. I believe that this is the only required change to match the semantics of the original patch. Signed-off-by: Adin Scannell --- arch/x86/xen/mmu.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 87f6673..288a7fc 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -2350,8 +2350,8 @@ int xen_remap_domain_mfn_range(struct vm_area_struct *vma, if (err) goto out; - err = -EFAULT; - if (HYPERVISOR_mmu_update(mmu_update, batch, NULL, domid) < 0) + err = HYPERVISOR_mmu_update(mmu_update, batch, NULL, domid); + if (err < 0) goto out; nr -= batch; -- 1.6.2.5