diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2020-04-06 10:58:36 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-29 16:34:29 +0200 |
commit | 05efdd839cd322f53fe489cff3e1da53265fda7d (patch) | |
tree | 1c33ef3fb663af215690e502e6906e3e17222309 /README | |
parent | c33b3b70763cf31fc597c949393f6395b6bdf766 (diff) | |
download | linux-stable-05efdd839cd322f53fe489cff3e1da53265fda7d.tar.gz linux-stable-05efdd839cd322f53fe489cff3e1da53265fda7d.tar.bz2 linux-stable-05efdd839cd322f53fe489cff3e1da53265fda7d.zip |
dma-direct: fix data truncation in dma_direct_get_required_mask()
[ Upstream commit cdcda0d1f8f4ab84efe7cd9921c98364398aefd7 ]
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>
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions