Merge tag 'acpi-extra-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / drivers / iommu / amd_iommu_init.c
index eea3d490e11707b368b02b3d014e781b46407763..6799cf9713f77f460f990e6bc0f38b31422c0745 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/amd-iommu.h>
 #include <linux/export.h>
 #include <linux/iommu.h>
+#include <linux/kmemleak.h>
 #include <asm/pci-direct.h>
 #include <asm/iommu.h>
 #include <asm/gart.h>
@@ -2090,6 +2091,7 @@ static struct syscore_ops amd_iommu_syscore_ops = {
 
 static void __init free_on_init_error(void)
 {
+       kmemleak_free(irq_lookup_table);
        free_pages((unsigned long)irq_lookup_table,
                   get_order(rlookup_table_size));
 
@@ -2320,6 +2322,8 @@ static int __init early_amd_iommu_init(void)
                irq_lookup_table = (void *)__get_free_pages(
                                GFP_KERNEL | __GFP_ZERO,
                                get_order(rlookup_table_size));
+               kmemleak_alloc(irq_lookup_table, rlookup_table_size,
+                              1, GFP_KERNEL);
                if (!irq_lookup_table)
                        goto out;
        }