]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dma-fence: Fix sparse warnings due __rcu annotations
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Mon, 16 Jun 2025 15:59:52 +0000 (16:59 +0100)
committerChristian König <christian.koenig@amd.com>
Mon, 9 Feb 2026 13:05:20 +0000 (14:05 +0100)
commit62918542b7bf08860a60ebbde7654486e0ac0776
tree24e2e6b45c0bd5ed45b748bad1e094892f110eb9
parentf2edbafc6cb905caec2b231e8e2226b4c75daad9
dma-fence: Fix sparse warnings due __rcu annotations

__rcu annotations on the return types from dma_fence_driver_name() and
dma_fence_timeline_name() cause sparse to complain because both the
constant signaled strings, and the strings return by the dma_fence_ops are
not __rcu annotated.

For a simple fix it is easiest to cast them with __rcu added and undo the
smarts from the tracpoints side of things. There is no functional change
since the rest is left in place. Later we can consider changing the
dma_fence_ops return types too, and handle all the individual drivers
which define them.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fixes: 506aa8b02a8d ("dma-fence: Add safe access helpers and document the rules")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506162214.1eA69hLe-lkp@intel.com/
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20250616155952.24259-1-tvrtko.ursulin@igalia.com
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/dma-buf/dma-fence.c
include/trace/events/dma_fence.h