milos-linux/kernel/dma
Li RongQing 9bfaa86b40 dma-debug: fix physical address retrieval in debug_dma_sync_sg_for_device
In debug_dma_sync_sg_for_device(), when iterating over a scatterlist,
the debug entry population mistakenly uses the head of the scatterlist
'sg' to fetch the physical address via sg_phys(), instead of using the
current iterator variable 's'.

This causes dma-debug to track the physical address of the very first
scatterlist entry for all subsequent entries in the list.

Fix this by passing the correct loop iterator 's' to sg_phys()

Fixes: 9d4f645a1f ("dma-debug: store a phys_addr_t in struct dma_debug_entry")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20260603123708.1665-1-lirongqing@baidu.com
2026-06-03 16:29:53 +02:00
..
coherent.c of: reserved_mem: switch to ops based OF_DECLARE() 2026-03-26 14:12:02 -05:00
contiguous.c Merge branch 'dma-contig-for-7.1-modules-prep-v4' into dma-mapping-for-next 2026-03-31 14:52:03 +02:00
debug.c dma-debug: fix physical address retrieval in debug_dma_sync_sg_for_device 2026-06-03 16:29:53 +02:00
debug.h dma-mapping: export new dma_*map_phys() interface 2025-09-12 00:18:21 +02:00
direct.c dma-mapping: direct: fix missing mapping for THRU_HOST_BRIDGE segments 2026-06-03 08:52:40 +02:00
direct.h dma-mapping: introduce DMA_ATTR_CC_SHARED for shared memory 2026-04-02 07:29:33 +02:00
dummy.c dma-mapping: convert dummy ops to physical address mapping 2025-10-29 10:27:29 +01:00
Kconfig dma-mapping: Separate DMA sync issuing and completion waiting 2026-03-13 23:47:31 +01:00
Makefile
map_benchmark.c dma-mapping: benchmark: add support for dma_map_sg 2026-03-04 11:22:05 +01:00
mapping.c dma-mapping: move dma_map_resource() sanity check into debug code 2026-05-18 09:04:59 +02:00
ops_helpers.c dma-mapping: remove unused map_page callback 2025-10-29 10:27:31 +01:00
pool.c dma/pool: distinguish between missing and exhausted atomic pools 2026-01-29 10:23:45 +01:00
remap.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
swiotlb.c memblock: updates for 7.0-rc1 2026-04-18 11:29:14 -07:00