# HG changeset patch # User Keir Fraser # Date 1292513937 0 # Node ID aa18b8ddaf05084aef3f8cff11d92248a8b6fac8 # Parent f46f46bbb69a788037f866025c88743d55dde416 vtd: Require unmap_vtd_domain_page() on a couple of early exit paths. From: Jan Beulich Signed-off-by: Keir Fraser --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1330,6 +1330,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; } @@ -1671,6 +1672,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;