iommu/amd: Fix ivrs_base memleak in early_amd_iommu_init()
Subsystems (3)
PATCH 1/1 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 82582f85ed22 ("iommu/amd: Disable AMD IOMMU if CMPXCHG16B feature is not supported")
Signed-off-by Zhen Ni <[email protected]>
--- drivers/iommu/amd/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iommu/amd/init.c +2 -1
@@ -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; }/*
Signature · 1 line
2.20.1
Quoted 15 lines · Zhen Ni
Fix a permanent ACPI table memory leak in
early_amd_iommu_init()when CMPXCHG16B feature is not supportedFixes 82582f85ed22 ("iommu/amd: Disable AMD IOMMU if CMPXCHG16B feature is not supported")Signed-off-by Zhen Ni <[email protected]>--- drivers/iommu/amd/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/iommu/amd/init.c +0
-0
drivers/iommu/amd/init.c static int __init early_amd_iommu_init(void) · line 3074
Quoted 9 lines
drivers/iommu/amd/init.c +2
-1@@ -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; }/*
Reviewed-by Suravee Suthikulpanit <[email protected]>
Thanks,
Suravee
Joerg Roedel
maintainerQuoted 9 lines · Zhen Ni
Fix a permanent ACPI table memory leak in
early_amd_iommu_init()when CMPXCHG16B feature is not supportedFixes 82582f85ed22 ("iommu/amd: Disable AMD IOMMU if CMPXCHG16B feature is not supported")Signed-off-by Zhen Ni <[email protected]>--- drivers/iommu/amd/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied for -rc, thanks.