ia64/xen-unstable
changeset 18493:01fb29f72832
vtd: 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@citrix.com>
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@citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Sep 15 11:35:20 2008 +0100 (2008-09-15) |
parents | c353f07bae84 |
children | 59aba2cbbb58 |
files | xen/drivers/passthrough/vtd/iommu.c |
line diff
1.1 --- a/xen/drivers/passthrough/vtd/iommu.c Mon Sep 15 11:34:42 2008 +0100 1.2 +++ b/xen/drivers/passthrough/vtd/iommu.c Mon Sep 15 11:35:20 2008 +0100 1.3 @@ -152,6 +152,7 @@ static u64 bus_to_context_maddr(struct i 1.4 maddr = alloc_pgtable_maddr(); 1.5 if ( maddr == 0 ) 1.6 { 1.7 + unmap_vtd_domain_page(root_entries); 1.8 spin_unlock_irqrestore(&iommu->lock, flags); 1.9 return 0; 1.10 }