This is a note to let you know that I've just added the patch titled swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: swiotlb-don-t-modify-orig_addr-in-swiotlb_tbl_sync_single.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Wed May 5 09:27:45 AM CEST 2021 From: Jianxiong Gao <jxgao@xxxxxxxxxx> Date: Thu, 29 Apr 2021 17:33:13 +0000 Subject: swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single To: stable@xxxxxxxxxxxxxxx, hch@xxxxxx, marcorr@xxxxxxxxxx, sashal@xxxxxxxxxx Cc: Jianxiong Gao <jxgao@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Message-ID: <20210429173315.1252465-8-jxgao@xxxxxxxxxx> From: Jianxiong Gao <jxgao@xxxxxxxxxx> commit: 16fc3cef33a04632ab6b31758abdd77563a20759 swiotlb_tbl_map_single currently nevers sets a tlb_addr that is not aligned to the tlb bucket size. But we're going to add such a case soon, for which this adjustment would be bogus. Signed-off-by: Christoph Hellwig <hch@xxxxxx> Acked-by: Jianxiong Gao <jxgao@xxxxxxxxxx> Tested-by: Jianxiong Gao <jxgao@xxxxxxxxxx> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Signed-off-by: Jianxiong Gao <jxgao@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- kernel/dma/swiotlb.c | 1 - 1 file changed, 1 deletion(-) --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c @@ -644,7 +644,6 @@ void swiotlb_tbl_sync_single(struct devi if (orig_addr == INVALID_PHYS_ADDR) return; - orig_addr += (unsigned long)tlb_addr & (IO_TLB_SIZE - 1); switch (target) { case SYNC_FOR_CPU: Patches currently in stable-queue which might be from jxgao@xxxxxxxxxx are queue-5.10/swiotlb-respect-min_align_mask.patch queue-5.10/swiotlb-factor-out-a-nr_slots-helper.patch queue-5.10/swiotlb-add-a-io_tlb_size-define.patch queue-5.10/swiotlb-clean-up-swiotlb_tbl_unmap_single.patch queue-5.10/swiotlb-factor-out-an-io_tlb_offset-helper.patch queue-5.10/swiotlb-don-t-modify-orig_addr-in-swiotlb_tbl_sync_single.patch queue-5.10/swiotlb-refactor-swiotlb_tbl_map_single.patch queue-5.10/driver-core-add-a-min_align_mask-field-to-struct-device_dma_parameters.patch queue-5.10/nvme-pci-set-min_align_mask.patch