[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1217867713-25450-1-git-send-email-joerg.roedel@amd.com>
Date: Mon, 4 Aug 2008 18:35:13 +0200
From: Joerg Roedel <joerg.roedel@....com>
To: mingo@...hat.com, tglx@...utronix.de
CC: hpa@...or.com, linux-kernel@...r.kernel.org,
iommu@...ts.linux-foundation.org,
Joerg Roedel <joerg.roedel@....com>
Subject: [PATCH] AMD IOMMU: initialize dma_ops after sysfs registration
This patch moves the initialization of the dma_ops interface for AMD IOMMU
behind the sysfs registration. Without this and if sysfs registration fails the
AMD IOMMU driver is still in place and operates on already freed data.
Signed-off-by: Joerg Roedel <joerg.roedel@....com>
---
arch/x86/kernel/amd_iommu_init.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index d9a9da5..880249d 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -954,15 +954,15 @@ int __init amd_iommu_init(void)
if (acpi_table_parse("IVRS", init_memory_definitions) != 0)
goto free;
- ret = amd_iommu_init_dma_ops();
+ ret = sysdev_class_register(&amd_iommu_sysdev_class);
if (ret)
goto free;
- ret = sysdev_class_register(&amd_iommu_sysdev_class);
+ ret = sysdev_register(&device_amd_iommu);
if (ret)
goto free;
- ret = sysdev_register(&device_amd_iommu);
+ ret = amd_iommu_init_dma_ops();
if (ret)
goto free;
--
1.5.3.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists