Skip to content
Commit 421f909c authored by Neil Turton's avatar Neil Turton Committed by Joerg Roedel
Browse files

amd-iommu: fix an off-by-one error in the AMD IOMMU driver.



The variable amd_iommu_last_bdf holds the maximum bdf of any device
controlled by an IOMMU, so the number of device entries needed is
amd_iommu_last_bdf+1.  The function tbl_size used amd_iommu_last_bdf
instead.  This would be a problem if the last device were a large
enough power of 2.

[ Impact: fix amd_iommu_last_bdf off-by-one error ]

Signed-off-by: default avatarNeil Turton <nturton@solarflare.com>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 41fb454e
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