[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.15 4/4] xen/iommu: x86: Don't leak the IOMMU page-tables
Hi,
On 22/12/2020 15:43, Julien Grall wrote:
From: Julien Grall <jgrall@xxxxxxxxxx>
The new IOMMU page-tables allocator will release the pages when
relinquish the domain resources. However, this is not sufficient in two
cases:
1) domain_relinquish_resources() is not called when the domain
creation fails.
2) There is nothing preventing page-table allocations when the
domain is dying.
In both cases, this can be solved by freeing the page-tables again
when the domain destruction. Although, this may result to an high
number of page-tables to free.
In the second case, it is pointless to allow page-table allocation when
the domain is going to die. iommu_alloc_pgtable() will now return an
error when it is called while the domain is dying.
Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
I forgot to mention this is fixing 15bc9a1ef51c "x86/iommu: add common
page-table allocator". I will add a Fixes tag for the next version.
Cheers,
--
Julien Grall
|