]> www.infradead.org Git - users/jedix/linux-maple.git/commit
udmabuf: use sgtable-based scatterlist wrappers
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 7 May 2025 16:09:12 +0000 (18:09 +0200)
committerChristian König <christian.koenig@amd.com>
Wed, 11 Jun 2025 11:18:07 +0000 (13:18 +0200)
commitafe382843717d44b24ef5014d57dcbaab75a4052
tree6be7d9cb4047164a1e1aae112bb4519a9c6e0c4f
parentaa3f93cd75bf8195e434deefff853d70d723d6f0
udmabuf: use sgtable-based scatterlist wrappers

Use common wrappers operating directly on the struct sg_table objects to
fix incorrect use of scatterlists sync calls. dma_sync_sg_for_*()
functions have to be called with the number of elements originally passed
to dma_map_sg_*() function, not the one returned in sgtable's nents.

Fixes: 1ffe09590121 ("udmabuf: fix dma-buf cpu access")
CC: stable@vger.kernel.org
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250507160913.2084079-3-m.szyprowski@samsung.com
drivers/dma-buf/udmabuf.c