]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] x86-64: Calgary IOMMU: deobfuscate calgary_init
authorJon Mason <jdmason@kudzu.us>
Thu, 5 Oct 2006 16:47:21 +0000 (18:47 +0200)
committerAndi Kleen <andi@basil.nowhere.org>
Thu, 5 Oct 2006 16:47:21 +0000 (18:47 +0200)
commit7b13def2d5572d0607d7342ff163eb100b454afa
treebefdff79af02b30ba42cfdb983343ea7ec7b363f
parent3f84dc8f16f0092c245b3d9f69a6fc0c219a9d82
[PATCH] x86-64: Calgary IOMMU: deobfuscate calgary_init

calgary_init's for loop does not correspond to the actual device being
checked, which makes its upperbound check for array overflow useless.
Changing this to a do-while loop is the correct way of doing this.
There should be no possibility of spinning forever in this loop, as
pci_get_device states that it will go through all iterations, then
return NULL (thus breaking the loop).

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
arch/x86_64/kernel/pci-calgary.c