linux/drivers/dma-buf
Robert Mader 1d0e25c1dd udmabuf: Ensure to perform cache synchronisation in begin_cpu_udmabuf()
The message of commit 504e2b4ab9 ("dma-buf/udmabuf: skip redundant cpu sync to
fix cacheline EEXIST warning") says:

> The CPU sync at map/unmap time is also redundant for udmabuf:
> begin_cpu_udmabuf() and end_cpu_udmabuf() already perform explicit
> cache synchronization via dma_sync_sgtable_for_cpu/device() when CPU
> access is requested through the dma-buf interface.

This, however, does not apply to the first time begin_cpu_udmabuf() is
called on an udmabuf, in which case the implementation previously relied on
get_sg_table() to perform the cache synchronisation.

Ensure to call dma_sync_sgtable_for_cpu() in that case as well.

Fixes: 504e2b4ab9 ("dma-buf/udmabuf: skip redundant cpu sync to fix cacheline EEXIST warning")
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Reviewed-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://patch.msgid.link/20260627105725.9083-1-robert.mader@collabora.com
2026-07-10 16:26:39 -07:00
..
heaps dma-buf: move system_cc_shared heap under separate Kconfig 2026-06-11 20:21:44 +05:30
.kunitconfig dma-buf: Change st-dma-resv.c to use kunit 2026-04-16 12:34:00 +02:00
dma-buf-mapping.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dma-buf.c dma-buf: fix UAF in dma_buf_fd() tracepoint 2026-05-28 20:05:43 +05:30
dma-fence-array.c dma-buf/dma_fence_array: remove unused functionality v4 2026-05-04 16:28:14 +02:00
dma-fence-chain.c dma-buf: Assign separate lockdep class to chain lock 2026-02-25 01:16:11 -08:00
dma-fence-unwrap.c Merge drm/drm-fixes into drm-misc-fixes 2026-06-29 17:58:00 +02:00
dma-fence.c Merge drm/drm-fixes into drm-misc-fixes 2026-06-29 17:58:00 +02:00
dma-heap.c dma-buf: heaps: Export mem_accounting parameter 2026-05-21 20:57:15 +05:30
dma-resv.c dma-buf/dma_fence_array: remove unused functionality v4 2026-05-04 16:28:14 +02:00
Kconfig dma-buf: Remove the old selftest 2026-04-16 12:34:00 +02:00
Makefile dma-buf: Remove the old selftest 2026-04-16 12:34:00 +02:00
st-dma-fence-chain.c dma-buf: Change st-dma-fence-chain.c to use kunit 2026-04-16 12:34:00 +02:00
st-dma-fence-unwrap.c dma-buf/dma_fence_array: remove unused functionality v4 2026-05-04 16:28:14 +02:00
st-dma-fence.c dma-buf: Change st-dma-fence.c to use kunit 2026-04-16 12:34:00 +02:00
st-dma-resv.c dma-buf: Change st-dma-resv.c to use kunit 2026-04-16 12:34:00 +02:00
sw_sync.c dma-buf: abstract fence locking v2 2026-02-23 16:14:19 +01:00
sync_debug.c dma-buf: Switch to use %ptSp 2025-11-19 10:24:13 +01:00
sync_debug.h dma-buf: inline spinlock for fence protection v5 2026-02-23 16:14:19 +01:00
sync_file.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sync_trace.h
udmabuf.c udmabuf: Ensure to perform cache synchronisation in begin_cpu_udmabuf() 2026-07-10 16:26:39 -07:00