Commit 2455d6a4 authored by Vasant Hegde's avatar Vasant Hegde Committed by Joerg Roedel
Browse files

iommu/amd: Free domain ID after domain_flush_pages



free_io_pgtable_ops() path uses domain ID to flush pages. Hence
free domain ID after flushing everything.

Signed-off-by: default avatarVasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/20220912063248.7909-4-vasant.hegde@amd.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 053bab4c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2004,12 +2004,12 @@ static void protection_domain_free(struct protection_domain *domain)
	if (!domain)
		return;

	if (domain->id)
		domain_id_free(domain->id);

	if (domain->iop.pgtbl_cfg.tlb)
		free_io_pgtable_ops(&domain->iop.iop.ops);

	if (domain->id)
		domain_id_free(domain->id);

	kfree(domain);
}