Re: [PATCH] dma-buf: Move dma_buf_release() from fops to dentry_ops

2020-06-10 Thread Sumit Semwal
On Wed, 10 Jun 2020 at 14:57, Arnd Bergmann wrote: > > On Wed, Jun 10, 2020 at 10:33 AM Sumit Semwal wrote: > > > > Charan Teja reported a 'use-after-free' in dmabuffs_dname [1], which > > happens if the dma_buf_release() is called while the userspace is > > accessing the dma_buf pseudo fs's

Re: [PATCH] dma-buf: Move dma_buf_release() from fops to dentry_ops

2020-06-10 Thread Arnd Bergmann
On Wed, Jun 10, 2020 at 10:33 AM Sumit Semwal wrote: > > Charan Teja reported a 'use-after-free' in dmabuffs_dname [1], which > happens if the dma_buf_release() is called while the userspace is > accessing the dma_buf pseudo fs's dmabuffs_dname() in another process, > and dma_buf_release()

[PATCH] dma-buf: Move dma_buf_release() from fops to dentry_ops

2020-06-10 Thread Sumit Semwal
Charan Teja reported a 'use-after-free' in dmabuffs_dname [1], which happens if the dma_buf_release() is called while the userspace is accessing the dma_buf pseudo fs's dmabuffs_dname() in another process, and dma_buf_release() releases the dmabuf object when the last reference to the struct file