diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2010-01-22 10:40:20 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2010-01-22 10:48:57 -0500 |
commit | d91afd15b041f27d34859c79afa9e172018a86f4 (patch) | |
tree | 649ead5c81f1c9d94a584cb4fbe966f1051047b3 /arch/x86/kernel | |
parent | 92dcffb916d309aa01778bf8963a6932e4014d07 (diff) |
x86/amd-iommu: Fix possible integer overflow
The variable i in this function could be increased to over
2**32 which would result in an integer overflow when using
int. Fix it by changing i to unsigned long.
Cc: stable@kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 23824fef789c..c2ccbd7b862f 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -980,7 +980,7 @@ static int alloc_new_range(struct dma_ops_domain *dma_dom, | |||
980 | { | 980 | { |
981 | int index = dma_dom->aperture_size >> APERTURE_RANGE_SHIFT; | 981 | int index = dma_dom->aperture_size >> APERTURE_RANGE_SHIFT; |
982 | struct amd_iommu *iommu; | 982 | struct amd_iommu *iommu; |
983 | int i; | 983 | unsigned long i; |
984 | 984 | ||
985 | #ifdef CONFIG_IOMMU_STRESS | 985 | #ifdef CONFIG_IOMMU_STRESS |
986 | populate = false; | 986 | populate = false; |