linux/kernel/dma
Kishon Vijay Abraham I 1edfff795d dma-direct: fix data truncation in dma_direct_get_required_mask()
[ Upstream commit cdcda0d1f8 ]

The upper 32-bit physical address gets truncated inadvertently
when dma_direct_get_required_mask() invokes phys_to_dma_direct().
This results in dma_addressing_limited() return incorrect value
when used in platforms with LPAE enabled.
Fix it here by explicitly type casting 'max_pfn' to phys_addr_t
in order to prevent overflow of intermediate value while evaluating
'(max_pfn - 1) << PAGE_SHIFT'.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-29 16:33:00 +02:00
..
Kconfig
Makefile
coherent.c
contiguous.c
debug.c dma-debug: fix displaying of dma allocation type 2020-04-23 10:36:43 +02:00
direct.c dma-direct: fix data truncation in dma_direct_get_required_mask() 2020-04-29 16:33:00 +02:00
dummy.c
mapping.c
remap.c
swiotlb.c
virt.c