summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu_init.c
diff options
context:
space:
mode:
authorArnd Bergmann2019-06-17 15:30:54 +0200
committerJoerg Roedel2019-06-18 17:24:42 +0200
commit29fcea8ce7f3c16ebd267f8cb2f4a07887530aa9 (patch)
tree87843c08754266b1e890b157ad2b21ff8d44ba18 /drivers/iommu/amd_iommu_init.c
parentiommu: Add padding to struct iommu_fault (diff)
downloadkernel-qcow2-linux-29fcea8ce7f3c16ebd267f8cb2f4a07887530aa9.tar.gz
kernel-qcow2-linux-29fcea8ce7f3c16ebd267f8cb2f4a07887530aa9.tar.xz
kernel-qcow2-linux-29fcea8ce7f3c16ebd267f8cb2f4a07887530aa9.zip
iommu: Fix integer truncation
On 32-bit architectures, phys_addr_t may be different from dma_add_t, both smaller and bigger. This can lead to an overflow during an assignment that clang warns about: drivers/iommu/dma-iommu.c:230:10: error: implicit conversion from 'dma_addr_t' (aka 'unsigned long long') to 'phys_addr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Werror,-Wconstant-conversion] Use phys_addr_t here because that is the type that the variable was declared as. Fixes: aadad097cd46 ("iommu/dma: Reserve IOVA for PCIe inaccessible DMA address") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
0 files changed, 0 insertions, 0 deletions