[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] VT-d: change bogus return value of intel_iommu_lookup_page()



commit 2a4c343c5baa241ea5d8685ac96989543ea67410
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri May 31 11:39:49 2019 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri May 31 11:39:49 2019 +0200

    VT-d: change bogus return value of intel_iommu_lookup_page()
    
    The function passes 0 as "alloc" argument to addr_to_dma_page_maddr(),
    so -ENOMEM simply makes no sense (and its use was probably simply a
    copy-and-paste effect originating at intel_iommu_map_page()).
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
    Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx>
---
 xen/drivers/passthrough/vtd/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/drivers/passthrough/vtd/iommu.c 
b/xen/drivers/passthrough/vtd/iommu.c
index 7b9e09a084..4caf63c7fa 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1870,7 +1870,7 @@ static int intel_iommu_lookup_page(struct domain *d, 
dfn_t dfn, mfn_t *mfn,
     if ( !pg_maddr )
     {
         spin_unlock(&hd->arch.mapping_lock);
-        return -ENOMEM;
+        return -ENOENT;
     }
 
     page = map_vtd_domain_page(pg_maddr);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.