diff options
author | Sasha Levin <sashal@kernel.org> | 2022-05-18 15:28:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-05-25 09:17:55 +0200 |
commit | e2cfa7b0935c2445cd7a2919f91831a0f9821c3d (patch) | |
tree | 586591cc91cbadf7b1523d72dc3589c7247d1f08 /kernel | |
parent | fe5ac3da50a92764bd534a39f851c744f0d4e2c3 (diff) | |
download | linux-stable-e2cfa7b0935c2445cd7a2919f91831a0f9821c3d.tar.gz linux-stable-e2cfa7b0935c2445cd7a2919f91831a0f9821c3d.tar.bz2 linux-stable-e2cfa7b0935c2445cd7a2919f91831a0f9821c3d.zip |
Revert "swiotlb: fix info leak with DMA_FROM_DEVICE"
This reverts commit d4d975e7921079f877f828099bb8260af335508f.
Upstream had a follow-up fix, revert, and a semi-reverted-revert.
Instead of going through this chain which is more painful to backport,
I'm just going to revert this original commit and pick the final one.
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/dma/swiotlb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index 62b1e5fa8673..0ed0e1f215c7 100644 --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c @@ -598,8 +598,7 @@ phys_addr_t swiotlb_tbl_map_single(struct device *dev, phys_addr_t orig_addr, tlb_addr = slot_addr(io_tlb_start, index) + offset; if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC) && - (!(attrs & DMA_ATTR_OVERWRITE) || dir == DMA_TO_DEVICE || - dir == DMA_BIDIRECTIONAL)) + (dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL)) swiotlb_bounce(orig_addr, tlb_addr, mapping_size, DMA_TO_DEVICE); return tlb_addr; } |