Skip to contentSkip to conversation

VT-d: fix two map_domain_page() leaks

PATCH New Jan Beulich 1 participant 1 message Dec 16, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 VT-d: fix two map_domain_page() leaks

xen/drivers/passthrough/vtd/iommu.c +2 -0
@@ -1331,6 +1331,7 @@ int domain_context_mapping_one(
     if ( context_set_domain_id(context, domain, iommu) )
     {
         spin_unlock(&iommu->lock);
+        unmap_vtd_domain_page(context_entries);
         return -EFAULT;
     }
 
@@ -1672,6 +1673,7 @@ static int intel_iommu_map_page(
     if ( old.val == new.val )
     {
         spin_unlock(&hd->mapping_lock);
+        unmap_vtd_domain_page(page);
         return 0;
     }
     *pte = new;
xen/drivers/passthrough/vtd/iommu.c +2 -0
@@ -1331,6 +1331,7 @@ int domain_context_mapping_one(
     if ( context_set_domain_id(context, domain, iommu) )
     {
         spin_unlock(&iommu->lock);
+        unmap_vtd_domain_page(context_entries);
         return -EFAULT;
     }
 
@@ -1672,6 +1673,7 @@ static int intel_iommu_map_page(
     if ( old.val == new.val )
     {
         spin_unlock(&hd->mapping_lock);
+        unmap_vtd_domain_page(page);
         return 0;
     }
     *pte = new;

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel