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

[Xen-devel] [PATCH] VT-d minor edge case memory leak


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Ross Philipson" <Ross.Philipson@xxxxxxxxxx>
  • Date: Fri, 12 Sep 2008 15:28:56 -0400
  • Delivery-date: Fri, 12 Sep 2008 12:29:32 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AckUv8Fws1aBE2JZT/CsudJmlNAD5gATaLDA
  • Thread-topic: [PATCH] VT-d minor edge case memory leak

Fixes an (unlikely) memory leak where mapped VT-d root entries are not
unmapped on allocation failure code path.

Signed-off-by: Ross Philipson <ross.philipson@xxxxxxxxxx>

diff -Nur a/xen/drivers/passthrough/vtd/iommu.c
b/xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       2008-09-12
08:40:15.000000000 -0400
+++ b/xen/drivers/passthrough/vtd/iommu.c       2008-09-12
15:13:36.000000000 -0400
@@ -152,6 +152,7 @@
         maddr = alloc_pgtable_maddr();
         if ( maddr == 0 )
         {
+            unmap_vtd_domain_page(root_entries);
             spin_unlock_irqrestore(&iommu->lock, flags);
             return 0;
         }


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


 


Rackspace

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