WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] VT-d: fix two map_domain_page() leaks

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] VT-d: fix two map_domain_page() leaks
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Thu, 16 Dec 2010 15:38:46 +0000
Cc: ZhouPeng <zpengxen@xxxxxxxxx>
Delivery-date: Thu, 16 Dec 2010 07:39:29 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Tested-by: ZhouPeng <zpengxen@xxxxxxxxx>

--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -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;



Attachment: vtd-map-page-leak.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] VT-d: fix two map_domain_page() leaks, Jan Beulich <=