x86/amd-iommu: Fix 3 possible endless loops
commitc3280cec8785749d7efffccd09d56df18747e02b
authorJoerg Roedel <joerg.roedel@amd.com>
Mon, 6 Jun 2011 14:04:02 +0000 (6 16:04 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:24:07 +0000 (23 15:24 -0700)
tree95d9423bf2c2d4634dcdc0abf8714ab7b5f0c065
parentd11e39e4c718f9b003bc7afb5540b590f4a40215
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>
arch/x86/kernel/amd_iommu_init.c