ia64/xen-unstable

changeset 17753:4505418b6393

vtd: addr_to_dma_page_maddr() must release its lock.
Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu May 29 09:39:23 2008 +0100 (2008-05-29)
parents f681c4de91fc
children 098c88335a74
files xen/drivers/passthrough/vtd/iommu.c
line diff
     1.1 --- a/xen/drivers/passthrough/vtd/iommu.c	Wed May 28 16:14:10 2008 +0100
     1.2 +++ b/xen/drivers/passthrough/vtd/iommu.c	Thu May 29 09:39:23 2008 +0100
     1.3 @@ -212,10 +212,10 @@ static u64 addr_to_dma_page_maddr(struct
     1.4      if ( hd->pgd_maddr == 0 )
     1.5      {
     1.6          if ( !alloc )
     1.7 -            return 0;
     1.8 +            goto out;
     1.9          hd->pgd_maddr = alloc_pgtable_maddr();
    1.10          if ( hd->pgd_maddr == 0 )
    1.11 -            return 0;
    1.12 +            goto out;
    1.13      }
    1.14  
    1.15      parent = (struct dma_pte *)map_vtd_domain_page(hd->pgd_maddr);
    1.16 @@ -263,6 +263,7 @@ static u64 addr_to_dma_page_maddr(struct
    1.17      }
    1.18  
    1.19      unmap_vtd_domain_page(parent);
    1.20 + out:
    1.21      spin_unlock_irqrestore(&hd->mapping_lock, flags);
    1.22      return pte_maddr;
    1.23  }