diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-09-17 06:19:58 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-19 06:59:27 -0400 |
commit | d58befd3a0110c93d70756537b4d01d05a9e6e12 (patch) | |
tree | f7bb361c7b3f7752520dfb78fbe762316e88eb5c | |
parent | 6754086ce67c0a1f5d7eac612102368781e14588 (diff) |
AMD IOMMU: free domain bitmap with its allocation order
The amd_iommu_pd_alloc_bitmap is allocated with a calculated order and
freed with order 1. This is not a bug since the calculated order always
evaluates to 1, but its unclean code. So replace the 1 with the
calculation in the release path.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 8c137598555..e60f4cd29eb 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
@@ -1144,7 +1144,8 @@ out: | |||
1144 | return ret; | 1144 | return ret; |
1145 | 1145 | ||
1146 | free: | 1146 | free: |
1147 | free_pages((unsigned long)amd_iommu_pd_alloc_bitmap, 1); | 1147 | free_pages((unsigned long)amd_iommu_pd_alloc_bitmap, |
1148 | get_order(MAX_DOMAIN_ID/8)); | ||
1148 | 1149 | ||
1149 | free_pages((unsigned long)amd_iommu_pd_table, | 1150 | free_pages((unsigned long)amd_iommu_pd_table, |
1150 | get_order(rlookup_table_size)); | 1151 | get_order(rlookup_table_size)); |