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

[Xen-changelog] [xen-unstable] vtd: addr_to_dma_page_maddr() must release its lock.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1212050363 -3600
# Node ID 4505418b63933e4887c808e376985c2421d035e3
# Parent  f681c4de91fcfa90de2dbdc187eebd95d7927ee9
vtd: addr_to_dma_page_maddr() must release its lock.
Signed-off-by: Xiaowei Yang <xiaowei.yang@xxxxxxxxx>
---
 xen/drivers/passthrough/vtd/iommu.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r f681c4de91fc -r 4505418b6393 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Wed May 28 16:14:10 2008 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c       Thu May 29 09:39:23 2008 +0100
@@ -212,10 +212,10 @@ static u64 addr_to_dma_page_maddr(struct
     if ( hd->pgd_maddr == 0 )
     {
         if ( !alloc )
-            return 0;
+            goto out;
         hd->pgd_maddr = alloc_pgtable_maddr();
         if ( hd->pgd_maddr == 0 )
-            return 0;
+            goto out;
     }
 
     parent = (struct dma_pte *)map_vtd_domain_page(hd->pgd_maddr);
@@ -263,6 +263,7 @@ static u64 addr_to_dma_page_maddr(struct
     }
 
     unmap_vtd_domain_page(parent);
+ out:
     spin_unlock_irqrestore(&hd->mapping_lock, flags);
     return pte_maddr;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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