x86/amd-iommu: Fix 3 possible endless loops
commit5d8e9bd2745ac9212f5a899471f46bfed2749d42
authorJoerg Roedel <joerg.roedel@amd.com>
Mon, 6 Jun 2011 14:04:02 +0000 (6 16:04 +0200)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:54:55 +0000 (1 13:54 -0700)
tree864101e35671cfb0ac6e5231abe2bc1d75404868
parentab0cc25a4b0367227df10f18c98db96af2db1dc0
x86/amd-iommu: Fix 3 possible endless loops

commit 0de66d5b35ee148455e268b2782873204ffdef4b upstream.

The driver contains several loops counting on an u16 value
where the exit-condition is checked against variables that
can have values up to 0xffff. In this case the loops will
never exit. This patch fixed 3 such loops.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
arch/x86/kernel/amd_iommu_init.c