]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:34 +0000 (11:05 +0100)
commit9d83ca27a6343849ad5f332ae3b9ef9890fb1e69
tree55b894450fc799bc2da599af2d1a74d628583cd6
parent3f6e9a24abeb01db5d3afe1e285476f5732724c5
udmabuf: use sgtable-based scatterlist wrappers

commit afe382843717d44b24ef5014d57dcbaab75a4052 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma-buf/udmabuf.c