Commit 923b7058 authored by Zhen Ni's avatar Zhen Ni Committed by Joerg Roedel
Browse files

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: 82582f85 ("iommu/amd: Disable AMD IOMMU if CMPXCHG16B feature is not supported")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarZhen Ni <zhen.ni@easystack.cn>
Reviewed-by: default avatarSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Link: https://lore.kernel.org/r/20250822024915.673427-1-zhen.ni@easystack.cn


Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent b320789d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3067,7 +3067,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;
	}

	/*