On Fri, 2026-09-25 at 19:32 +0200, Danilo Krummrich wrote:
> On Fri Sep 25, 2026 at 7:21 PM CEST, Philipp Stanner wrote:
> > I guess we agree that it would be a horrible bug if there's still a
> > command buffer running on the GPU that can access memory which might
> > have been freed once the associated fence signaled.
> 
> Sure, but that's unrelated.
> 
> > So I suppose what you are saying is more: there is not much value in
> > the case of *JobQueue*, basically because all the jobs live inside of
> > it anyways.
> 
> No, I'm saying there is not much value in general. Whatever thing owns the
> DriverFence has to represent the "device access" of some resource, which
> already naturally establishes the relationship.
> 
> IOW, whatever thing owns a DriverFence is also the thing that stops the 
> hardware
> in its own drop() implementation; anything else would be rather questionable.
> 
> > So I suppose we agree that a warning is fine. It won't fire in JQ
> > anyways, but might benefit others.
> 
> What scenario are you thinking of?

Drivers doing "rather questionable" things, like we've seen a great
many times already ;)

Note that the dma_fence backend fires a WARN_ON if a fence is freed
unsignaled, too, for the same reason.

Life finds a way.


P.

Reply via email to