Skip to content

Commit 99e8ccd

Browse files
rafaeljwjoergroedel
authored andcommitted
iommu/amd: Fix error code path in early_amd_iommu_init()
Prevent early_amd_iommu_init() from leaking memory mapped via acpi_get_table() if check_ivrs_checksum() returns an error. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 432abf6 commit 99e8ccd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/amd_iommu_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2230,7 +2230,7 @@ static int __init early_amd_iommu_init(void)
22302230
*/
22312231
ret = check_ivrs_checksum(ivrs_base);
22322232
if (ret)
2233-
return ret;
2233+
goto out;
22342234

22352235
amd_iommu_target_ivhd_type = get_highest_supported_ivhd_type(ivrs_base);
22362236
DUMP_printk("Using IVHD type %#x\n", amd_iommu_target_ivhd_type);

0 commit comments

Comments
 (0)