On 8/10/22 21:25, Christian König wrote:
Am 10.08.22 um 19:49 schrieb Dmitry Osipenko:It also vmap/vunmap and attach/detach: In the previous patch I added the
On 8/10/22 14:30, Christian König wrote:Ok, so this is only changing map/unmap now?
Am 25.07.22 um 17:18 schrieb Dmitry Osipenko:Hm, neither of drivers take the resv lock in map_dma_buf/unmap_dma_buf.
This patch moves the non-dynamic dma-buf users over to the dynamicIn general "Yes, please", but that won't be that easy.
locking specification. The strict locking convention prevents deadlock
situation for dma-buf importers and exporters.
Previously the "unlocked" versions of the dma-buf API functions weren't
taking the reservation lock and this patch makes them to take the lock.
Intel and AMD GPU drivers already were mapping imported dma-bufs under
the held lock, hence the "locked" variant of the functions are added
for them and the drivers are updated to use the "locked" versions.
You not only need to change amdgpu and i915, but all drivers
implementing the map_dma_buf(), unmap_dma_buf() callbacks.
Auditing all that code is a huge bunch of work.
It's easy to audit them all and I did it. So either I'm missing
something or it doesn't take much time to check them all. Am I really
missing something?
_unlocked postfix to the func names and in this patch I made them all to
actually take the lock.
In this case please separate this from the documentation change.I'll factor out the doc in the v3.
I would also drop the _locked postfix from the function name, justNoted for the v3.
having _unlocked on all functions which are supposed to be called with
the lock held should be sufficient.
Thanks for looking into this,Thank you for the review.
Christian.