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

2020-06-22 Thread Sumit Semwal
Hello Charan, On Tue, 16 Jun 2020 at 19:13, Charan Teja Kalla wrote: > > Thanks Sumit for the fix. > > On 6/11/2020 5:14 PM, 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 > >

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

2020-06-16 Thread Charan Teja Kalla
Thanks Sumit for the fix. On 6/11/2020 5:14 PM, 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

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

2020-06-16 Thread Sumit Semwal
Hi Chris, On Tue, 16 Jun 2020 at 18:20, Chris Wilson wrote: > > Quoting Sumit Semwal (2020-06-16 13:42:13) > > Hello, > > > > If there are no objections to this, I will plan to merge it soon. > > I was going to suggest running it against our CI, but that's unavailable > at the moment. > >

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

2020-06-16 Thread Chris Wilson
Quoting Sumit Semwal (2020-06-16 13:42:13) > Hello, > > If there are no objections to this, I will plan to merge it soon. I was going to suggest running it against our CI, but that's unavailable at the moment. There's a particularly nasty BUG_ON() in dma_buf_release that we hit irregularly,

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

2020-06-16 Thread Sumit Semwal
Hello, If there are no objections to this, I will plan to merge it soon. Daniel, Chris, Chenbo? On Thu, 11 Jun 2020 at 17:14, 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 >

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

2020-06-11 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