* [PATCH] AMD IOMMU: initialize dma_ops after sysfs registration
@ 2008-08-04 16:35 Joerg Roedel
0 siblings, 0 replies; only message in thread
From: Joerg Roedel @ 2008-08-04 16:35 UTC (permalink / raw)
To: mingo, tglx; +Cc: hpa, linux-kernel, iommu, Joerg Roedel
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@amd.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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-04 16:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-04 16:35 [PATCH] AMD IOMMU: initialize dma_ops after sysfs registration Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®