Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dma-buf: warn about containers in dma_resv object

Drivers should not add containers as shared fences to the dma_resv
object, instead each fence should be added individually.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220204100429.2049-5-christian.koenig@amd.com

+5
+5
drivers/dma-buf/dma-resv.c
··· 256 256 257 257 dma_resv_assert_held(obj); 258 258 259 + /* Drivers should not add containers here, instead add each fence 260 + * individually. 261 + */ 262 + WARN_ON(dma_fence_is_container(fence)); 263 + 259 264 fobj = dma_resv_shared_list(obj); 260 265 count = fobj->shared_count; 261 266