aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-01-22 16:40:20 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-02-09 04:50:54 -0800
commit253f887cc8d719087f8de403cfe1a60b5e56b454 (patch)
tree92bdc3e76e986ca3bdb1ab3e633844884d9f1abf /arch
parentd1a31038aadf0fb13befb444e60d96f3618766d0 (diff)
downloadlinux-linaro-stable-253f887cc8d719087f8de403cfe1a60b5e56b454.tar.gz
x86/amd-iommu: Fix possible integer overflow
commit d91afd15b041f27d34859c79afa9e172018a86f4 upstream. 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. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/amd_iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 90b9b559e7a4..e3f85feaae2e 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -540,7 +540,7 @@ static void flush_all_devices_for_iommu(struct amd_iommu *iommu)
static void flush_devices_by_domain(struct protection_domain *domain)
{
struct amd_iommu *iommu;
- int i;
+ unsigned long i;
for (i = 0; i <= amd_iommu_last_bdf; ++i) {
if ((domain == NULL && amd_iommu_pd_table[i] == NULL) ||