Skip to content

Commit 923b705

Browse files
nizhen-tjoergroedel
authored andcommitted
iommu/amd: Fix ivrs_base memleak in early_amd_iommu_init()
Fix a permanent ACPI table memory leak in early_amd_iommu_init() when CMPXCHG16B feature is not supported Fixes: 82582f8 ("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>
1 parent b320789 commit 923b705

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/iommu/amd/init.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3067,7 +3067,8 @@ static int __init early_amd_iommu_init(void)
30673067

30683068
if (!boot_cpu_has(X86_FEATURE_CX16)) {
30693069
pr_err("Failed to initialize. The CMPXCHG16B feature is required.\n");
3070-
return -EINVAL;
3070+
ret = -EINVAL;
3071+
goto out;
30713072
}
30723073

30733074
/*

0 commit comments

Comments
 (0)