diff options
| author | Christian König <christian.koenig@amd.com> | 2025-10-08 19:12:46 +0300 |
|---|---|---|
| committer | Christian König <christian.koenig@amd.com> | 2026-02-23 18:14:02 +0300 |
| commit | 541c8f2468b933acc5d129e84bd264923675a66e (patch) | |
| tree | 4bb780fb5a94fd995c41b4dd582358bc2d7eadeb /include/linux | |
| parent | f4cc3ab824d6772a48ca9d9c74ac623b3309985d (diff) | |
| download | linux-541c8f2468b933acc5d129e84bd264923675a66e.tar.xz | |
dma-buf: detach fence ops on signal v3
When neither a release nor a wait backend ops is specified it is possible
to let the dma_fence live on independently of the module who issued it.
This makes it possible to unload drivers and only wait for all their
fences to signal.
v2: fix typo in comment
v3: fix sparse rcu warnings
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/r/20260219160822.1529-3-christian.koenig@amd.com
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dma-fence.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h index fa3cfe3e98ac..9ff2c4a09cdc 100644 --- a/include/linux/dma-fence.h +++ b/include/linux/dma-fence.h @@ -472,7 +472,7 @@ dma_fence_is_signaled_locked(struct dma_fence *fence) rcu_read_lock(); ops = rcu_dereference(fence->ops); - if (ops->signaled && ops->signaled(fence)) { + if (ops && ops->signaled && ops->signaled(fence)) { rcu_read_unlock(); dma_fence_signal_locked(fence); return true; @@ -508,7 +508,7 @@ dma_fence_is_signaled(struct dma_fence *fence) rcu_read_lock(); ops = rcu_dereference(fence->ops); - if (ops->signaled && ops->signaled(fence)) { + if (ops && ops->signaled && ops->signaled(fence)) { rcu_read_unlock(); dma_fence_signal(fence); return true; |
