public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/pci: fix dmar_tbl early_ioremap leak v2
@ 2008-09-25  7:28 Yinghai Lu
  2008-09-25  8:11 ` Ingo Molnar
  2008-09-25 18:56 ` Suresh Siddha
  0 siblings, 2 replies; 8+ messages in thread
From: Yinghai Lu @ 2008-09-25  7:28 UTC (permalink / raw)
  To: Suresh Siddha, Jesse Barnes, Ingo Molnar, Thomas Gleixner,
	H. Peter Anvin, Andrew Morton
  Cc: linux-kernel, linux-pci, Yinghai Lu

use early_acpi_os_unmap_memory

v2: move unmap_memory early...

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>

---
 drivers/pci/dmar.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/pci/dmar.c
===================================================================
--- linux-2.6.orig/drivers/pci/dmar.c
+++ linux-2.6/drivers/pci/dmar.c
@@ -42,6 +42,7 @@
 LIST_HEAD(dmar_drhd_units);
 
 static struct acpi_table_header * __initdata dmar_tbl;
+static acpi_size __initdata dmar_tbl_size;
 
 static void __init dmar_register_drhd_unit(struct dmar_drhd_unit *drhd)
 {
@@ -297,8 +298,9 @@ static int __init dmar_table_detect(void
 	acpi_status status = AE_OK;
 
 	/* if we could find DMAR table, then there are DMAR devices */
-	status = acpi_get_table(ACPI_SIG_DMAR, 0,
-				(struct acpi_table_header **)&dmar_tbl);
+	status = acpi_get_table_with_size(ACPI_SIG_DMAR, 0,
+				(struct acpi_table_header **)&dmar_tbl,
+				&dmar_tbl_size);
 
 	if (ACPI_SUCCESS(status) && !dmar_tbl) {
 		printk (KERN_WARNING PREFIX "Unable to map DMAR\n");
@@ -493,6 +495,9 @@ void __init detect_intel_iommu(void)
 	}
 end:
 #endif
+	if (dmar_tbl)
+		early_acpi_os_unmap_memory(dmar_tbl, dmar_tbl_size);
+
 	dmar_tbl = NULL;
 }
 

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

end of thread, other threads:[~2008-09-27 18:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-25  7:28 [PATCH] x86/pci: fix dmar_tbl early_ioremap leak v2 Yinghai Lu
2008-09-25  8:11 ` Ingo Molnar
2008-09-25 14:43   ` Jesse Barnes
2008-09-25 14:59     ` David Woodhouse
2008-09-25 16:24     ` mark gross
2008-09-25 17:01       ` Yinghai Lu
2008-09-27 18:48         ` Ingo Molnar
2008-09-25 18:56 ` Suresh Siddha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox