On Thu, 2026-11-05 at 13:27 +0800, Edward Adam Davis wrote:
> ---
> v1 -> v2: use dma_fence_get_rcu() and remove link & erase pt node
Ideally, one avoids sending new versions within 24 hours :)
>
> drivers/dma-buf/sw_sync.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma-buf/sw_sync.c b/drivers/dma-buf/sw_sync.c
> index 8df20b0218a9..261bc98b1ed6 100644
> --- a/drivers/dma-buf/sw_sync.c
> +++ b/drivers/dma-buf/sw_sync.c
> @@ -221,7 +221,11 @@ static void sync_timeline_signal(struct sync_timeline
> *obj, unsigned int inc)
> if (!timeline_fence_signaled(&pt->base))
> break;
>
> - dma_fence_get(&pt->base);
> + if (!dma_fence_get_rcu(&pt->base)) {
You must hold the rcu_read_lock() while doing that, don't you?
This probably works "by coincidence" since the surrounding spinlock
also disables preemption, like the rcu lock does.
That spinlock, why can't it guard the dma_fence reference? Doesn't obj-
>pt_list hold its own reference?
P.