diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-12-19 14:42:15 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-14 09:44:09 -0800 |
commit | 938d1732649548da9887c7159a1d4f95d9e11995 (patch) | |
tree | ad23b3d138111cdb7c2752b94c6ab3a8e40beba3 | |
parent | 4d624f54bd2bb311501c33ac0e17aec45ea91d2c (diff) |
AMD IOMMU: fix wrong loop counter in free_pagetables
Upstream commit 3cc3d84bffbd93bdb671ac7961b12cd98fbb9266
This fixes a bug which causes the driver to go in an endless loop if
initialization fails and its resources are freed.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index a1493bb3ed9..20804d06c70 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -487,7 +487,7 @@ static void dma_ops_free_pagetable(struct dma_ops_domain *dma_dom) continue; p2 = IOMMU_PTE_PAGE(p1[i]); - for (j = 0; j < 512; ++i) { + for (j = 0; j < 512; ++j) { if (!IOMMU_PTE_PRESENT(p2[j])) continue; p3 = IOMMU_PTE_PAGE(p2[j]); |