diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-12-08 14:40:26 +0100 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2008-12-08 14:58:55 +0100 |
commit | b8d9905d025d80a2357e8ce4704fde2923f6a1bd (patch) | |
tree | 211d3062a9f9da39fd1cc5475a4cfba5e1ba5cd5 /arch/x86/kernel | |
parent | 8ad909c4c1b91bd35ba6a2af5e7ab3fc8d9fe283 (diff) | |
download | op-kernel-dev-b8d9905d025d80a2357e8ce4704fde2923f6a1bd.zip op-kernel-dev-b8d9905d025d80a2357e8ce4704fde2923f6a1bd.tar.gz |
AMD IOMMU: __unmap_single: check for bad_dma_address instead of 0
Impact: minor fix
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 3133a0e..a7b6dec 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -983,7 +983,8 @@ static void __unmap_single(struct amd_iommu *iommu, dma_addr_t i, start; unsigned int pages; - if ((dma_addr == 0) || (dma_addr + size > dma_dom->aperture_size)) + if ((dma_addr == bad_dma_address) || + (dma_addr + size > dma_dom->aperture_size)) return; pages = iommu_num_pages(dma_addr, size, PAGE_SIZE); |