summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhen Ni <zhen.ni@easystack.cn>2025-08-22 10:49:15 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-25 11:16:48 +0200
commitb0c0e231060aa8bfe6e24e7d15e31ce59e11b1e1 (patch)
treec4f7fafa6d620cc3f962f15997bbe93d5b41f99d
parent7ff7d16649b2393562a3bf5866b83481424e86a6 (diff)
iommu/amd: Fix ivrs_base memleak in early_amd_iommu_init()
commit 923b70581cb6acede90f8aaf4afe5d1c58c67b71 upstream. Fix a permanent ACPI table memory leak in early_amd_iommu_init() when CMPXCHG16B feature is not supported Fixes: 82582f85ed22 ("iommu/amd: Disable AMD IOMMU if CMPXCHG16B feature is not supported") Cc: stable@vger.kernel.org Signed-off-by: Zhen Ni <zhen.ni@easystack.cn> Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Link: https://lore.kernel.org/r/20250822024915.673427-1-zhen.ni@easystack.cn Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/iommu/amd/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 7add9bcf45dc..3a97cc667943 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -3048,7 +3048,8 @@ static int __init early_amd_iommu_init(void)
if (!boot_cpu_has(X86_FEATURE_CX16)) {
pr_err("Failed to initialize. The CMPXCHG16B feature is required.\n");
- return -EINVAL;
+ ret = -EINVAL;
+ goto out;
}
/*