All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu/amd: Fix ivrs_base memleak in early_amd_iommu_init()
@ 2025-08-22  2:49 Zhen Ni
  2025-08-22 20:59 ` Suthikulpanit, Suravee
  2025-09-05 12:42 ` Joerg Roedel
  0 siblings, 2 replies; 3+ messages in thread
From: Zhen Ni @ 2025-08-22  2:49 UTC (permalink / raw)
  To: joro, suravee.suthikulpanit, will, robin.murphy; +Cc: iommu, Zhen Ni, stable

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>
---
 drivers/iommu/amd/init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 7b5af6176de9..dddc432de7b0 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -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;
 	}
 
 	/*
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-05 12:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-22  2:49 [PATCH] iommu/amd: Fix ivrs_base memleak in early_amd_iommu_init() Zhen Ni
2025-08-22 20:59 ` Suthikulpanit, Suravee
2025-09-05 12:42 ` Joerg Roedel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.