linux-stable/drivers/dma-buf
Jason Ekstrand 3f1102c506 dma-buf: Use dma_fence_unwrap_for_each when importing fences
commit c19083c72e upstream.

Ever since 68129f431f ("dma-buf: warn about containers in dma_resv object"),
dma_resv_add_shared_fence will warn if you attempt to add a container fence.
While most drivers were fine, fences can also be added to a dma_resv via the
recently added DMA_BUF_IOCTL_IMPORT_SYNC_FILE.  Use dma_fence_unwrap_for_each
to add each fence one at a time.

Fixes: 594740497e ("dma-buf: Add an API for importing sync files (v10)")
Signed-off-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reported-by: Sarah Walker <Sarah.Walker@imgtec.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
CC: stable@vger.kernel.org
Link: https://patchwork.freedesktop.org/patch/msgid/20220802210158.4162525-1-jason.ekstrand@collabora.com
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-12-02 17:43:10 +01:00
..
heaps dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
Kconfig dma-buf: deprecate DMABUF_SYSFS_STATS 2022-06-23 10:51:43 +02:00
Makefile dma-buf: cleanup dma_fence_unwrap implementation 2022-05-30 14:16:32 +02:00
dma-buf-sysfs-stats.c kobject: remove kset from struct kset_uevent_ops callbacks 2021-12-28 11:26:18 +01:00
dma-buf-sysfs-stats.h dma-buf: Delete the DMA-BUF attachment sysfs statistics 2021-07-20 11:06:59 +02:00
dma-buf.c dma-buf: Use dma_fence_unwrap_for_each when importing fences 2022-12-02 17:43:10 +01:00
dma-fence-array.c dma-buf: handle empty dma_fence_arrays gracefully 2022-03-29 09:14:30 +02:00
dma-fence-chain.c dma-buf: cleanup dma_fence_chain_walk 2022-05-30 11:24:50 +02:00
dma-fence-unwrap.c dma-buf: revert "return only unsignaled fences in dma_fence_unwrap_for_each v3" 2022-07-14 14:41:30 +02:00
dma-fence.c dma-buf: add dma_fence_describe and dma_resv_describe v2 2021-11-11 09:35:13 +01:00
dma-heap.c dma-buf: fix racing conflict of dma_heap_add() 2022-12-02 17:43:07 +01:00
dma-resv.c dma-buf/dma-resv: check if the new fence is really later 2022-08-25 13:10:30 +02:00
selftest.c dma-buf: Introduce selftesting framework 2019-08-19 18:01:34 +01:00
selftest.h dma-buf: Introduce selftesting framework 2019-08-19 18:01:34 +01:00
selftests.h dma-buf: add dma_fence_unwrap v2 2022-03-25 14:18:28 +01:00
st-dma-fence-chain.c dma-buf: add dma_fence_chain_alloc/free v3 2021-06-14 19:38:34 +02:00
st-dma-fence-unwrap.c dma-buf: generalize dma_fence unwrap & merging v3 2022-05-30 14:24:04 +02:00
st-dma-fence.c dma-buf: Avoid comma separated statements 2021-02-09 17:14:11 +01:00
st-dma-resv.c dma-buf: drop seq count based update 2022-04-07 12:53:54 +02:00
sw_sync.c compat_ioctl: move more drivers to compat_ptr_ioctl 2019-10-23 17:23:44 +02:00
sync_debug.c Linux 5.2-rc5 2019-06-19 12:07:29 +02:00
sync_debug.h
sync_file.c dma-buf: generalize dma_fence unwrap & merging v3 2022-05-30 14:24:04 +02:00
sync_trace.h
udmabuf.c udmabuf: Set ubuf->sg = NULL if the creation of sg table fails 2022-10-21 12:39:13 +02:00