[PATCH 0/4] cover-letter: Allow MMIO regions to be exported through dmabuf
Jason Gunthorpe
jgg at nvidia.com
Thu Jan 2 13:39:51 UTC 2025
On Thu, Dec 19, 2024 at 11:04:54AM +0100, Christian König wrote:
> > Based on all the above, I think we can conclude that since dma_buf_put()
> > does not directly (or synchronously) call the f_op->release() handler, a
> > deadlock is unlikely to occur in the scenario you described.
Right, there is no deadlock here, and there is nothing inhernetly
wrong with using try_get like this. The locking here is ugly ugly
ugly, I forget why, but this was the best I came up with to untangle
it without deadlocks or races.
> Yeah, I agree.
>
> Interesting to know, I wasn't aware that the task_work functionality exists
> for that use case.
IIRC it was changed a while back because call chains were getting kind of
crazy long with the file release functions and stack overflow was a
problem in some cases.
Jason
More information about the dri-devel
mailing list