linux/drivers/iommu/amd
Suravee Suthikulpanit 6b0b2d9a6a iommu/amd: Fix I/O page table memory leak
The current logic updates the I/O page table mode for the domain
before calling the logic to free memory used for the page table.
This results in IOMMU page table memory leak, and can be observed
when launching VM w/ pass-through devices.

Fix by freeing the memory used for page table before updating the mode.

Cc: Joerg Roedel <joro@8bytes.org>
Reported-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Tested-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Fixes: e42ba06330 ("iommu/amd: Restructure code for freeing page table")
Link: https://lore.kernel.org/all/20220118194720.urjgi73b7c3tq2o6@oracle.com/
Link: https://lore.kernel.org/r/20220210154745.11524-1-suravee.suthikulpanit@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2022-02-14 12:52:40 +01:00
..
amd_iommu_types.h iommu/amd: Recover from event log overflow 2022-02-14 12:06:55 +01:00
amd_iommu.h iommu/amd: Recover from event log overflow 2022-02-14 12:06:55 +01:00
debugfs.c
init.c iommu/amd: Recover from event log overflow 2022-02-14 12:06:55 +01:00
io_pgtable.c iommu/amd: Fix I/O page table memory leak 2022-02-14 12:52:40 +01:00
iommu_v2.c iommu/amd: Clarify AMD IOMMUv2 initialization messages 2021-11-26 22:54:20 +01:00
iommu.c iommu/amd: Recover from event log overflow 2022-02-14 12:06:55 +01:00
Kconfig iommu/amd: Prepare for generic IO page table framework 2021-01-28 16:51:17 +01:00
Makefile iommu/amd: Prepare for generic IO page table framework 2021-01-28 16:51:17 +01:00
quirks.c