Skip to content
Commit dedc9937 authored by Jon Mason's avatar Jon Mason Committed by Andi Kleen
Browse files

[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: default avatarJon Mason <jdmason@kudzu.us>
Signed-off-by: default avatarMuli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 814eadce
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment