Re: [PATCH v4 1/3] drm/sched: cache the timeline name to fix a use-after-free
From: Philipp Stanner
Date: Mon Sep 07 2026 - 07:20:08 EST
On Mon, 2026-09-07 at 12:06 +0100, Tvrtko Ursulin wrote:
> On 07/09/2026 11:47, Philipp Stanner wrote:
[…]
> >
> > So I maintain the position that we only get it right by having the
> > signaled-bit be the decoupling point.
> >
> > Or am I missing something?
>
> The driver fixes you asked about and I listed work(ed) in the context of
> 506aa8b02a8d ("dma-fence: Add safe access helpers and document the
> rules"). In that "world" it would have been safe. Did 035219a760ed
> ("dma-buf: dma-fence: Fix potential NULL pointer dereference") break
> those fixes a bit?
I think we all agree that 035219a760ed should not have been implemented
in that way because it does not work for drivers that provide a ops-
>release / ops->wait.
So I think the only thing we can do right now is add the signaled-check
back (like Christian suggested) and ensure correct memory ordering –
since we also cannot use the spinlock consistently, as that can still
be extern…
P.