diff options
| author | Kishon Vijay Abraham I <[email protected]> | 2020-04-06 05:28:36 +0000 |
|---|---|---|
| committer | Christoph Hellwig <[email protected]> | 2020-04-08 18:52:24 +0000 |
| commit | cdcda0d1f8f4ab84efe7cd9921c98364398aefd7 (patch) | |
| tree | 6e1d686f922eb225bac1ba2f89d8363598eee906 /tools/perf/scripts/python/intel-pt-events.py | |
| parent | Merge tag 'drm-next-2020-04-08' of git://anongit.freedesktop.org/drm/drm (diff) | |
| download | kernel-cdcda0d1f8f4ab84efe7cd9921c98364398aefd7.tar.gz kernel-cdcda0d1f8f4ab84efe7cd9921c98364398aefd7.zip | |
dma-direct: fix data truncation in dma_direct_get_required_mask()
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
0 files changed, 0 insertions, 0 deletions
