summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2020-04-06 10:58:36 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-29 16:33:00 +0200
commit1edfff795d4f2117a1b95484213cb9fb4a46dc48 (patch)
treeea236459c92e6039cd523639b4b76bd42d9349ba /security
parent8300465623bfcbafbd01b60eef04ebf037ca42db (diff)
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 'security')
0 files changed, 0 insertions, 0 deletions