[PATCH] dma-buf/dma-fence: Signal all callbacks from dma_fence_release()

Chris Wilson chris at chris-wilson.co.uk
Tue Aug 15 11:23:46 UTC 2017


Quoting Christian König (2017-08-13 14:04:29)
> Am 11.08.2017 um 19:01 schrieb Chris Wilson:
> > This is an illegal scenario, to free the fence whilst there are pending
> > callbacks. Currently, we emit a WARN and then cast aside the callbacks
> > leaving them dangling. Alternatively, we could set an error on the fence
> > and then signal fence so that any dependency chains from the fence can
> > be tidied up, and if they care they can check for the error.
> >
> > The question is whether or not the cure is worse than the disease
> > (premature fence signaling is never pretty).
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> 
> Not sure if -EDEADLK is the best error code, but in general the approach 
> sounds like the least evil to me.

EDEADLK felt appropriate since that was the situation that I expect might
arise, well livelock.

-ENXIO? That seems a reasonable alternative.
-ENODEV?
The classic -ENOTTY?
-Chris


More information about the dri-devel mailing list