Re: [PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-10 Thread Jason Gunthorpe
On Fri, Oct 09, 2020 at 09:39:00AM +0200, Daniel Vetter wrote: > I just noticed this here in the patch because everyone else does not do > this. But looking at the mmap_region() code in mmap.c we seem to indeed > have this problem for the error path: > > unmap_and_free_vma: > vma->vm_file =

Re: [PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-09 Thread Christian König
Am 09.10.20 um 14:12 schrieb Jason Gunthorpe: On Fri, Oct 09, 2020 at 09:39:00AM +0200, Daniel Vetter wrote: I just noticed this here in the patch because everyone else does not do this. But looking at the mmap_region() code in mmap.c we seem to indeed have this problem for the error path: unma

Re: [PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-09 Thread Daniel Vetter
On Fri, Oct 09, 2020 at 09:16:49AM +0200, Christian König wrote: > Am 08.10.20 um 16:12 schrieb Daniel Vetter: > > On Thu, Oct 08, 2020 at 01:23:39PM +0200, Christian König wrote: > > > Add the new vma_set_file() function to allow changing > > > vma->vm_file with the necessary refcount dance. > > >

Re: [PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-09 Thread John Hubbard
On 10/9/20 12:33 AM, Christian König wrote: Am 08.10.20 um 23:49 schrieb John Hubbard: On 10/8/20 4:23 AM, Christian König wrote: ... diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c index 3d69e51f3e4d..c9d5f1a38af3 100644 --- a/drivers/gpu/drm/

Re: [PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-09 Thread Christian König
Am 08.10.20 um 23:49 schrieb John Hubbard: On 10/8/20 4:23 AM, Christian König wrote: Add the new vma_set_file() function to allow changing vma->vm_file with the necessary refcount dance. v2: add more users of this. Signed-off-by: Christian König ---   drivers/dma-buf/dma-buf.c   

Re: [PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-09 Thread Matthew Wilcox
On Thu, Oct 08, 2020 at 01:23:39PM +0200, Christian König wrote: > drivers/dma-buf/dma-buf.c | 16 +--- > drivers/gpu/drm/etnaviv/etnaviv_gem.c | 4 +--- > drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 3 +-- > drivers/gpu/drm/i915/gem/i915_gem_mman.c | 4 ++--

Re: [PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-09 Thread Christian König
Am 08.10.20 um 16:12 schrieb Daniel Vetter: On Thu, Oct 08, 2020 at 01:23:39PM +0200, Christian König wrote: Add the new vma_set_file() function to allow changing vma->vm_file with the necessary refcount dance. v2: add more users of this. Signed-off-by: Christian König --- drivers/dma-buf/d

Re: [PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-08 Thread John Hubbard
On 10/8/20 4:23 AM, Christian König wrote: Add the new vma_set_file() function to allow changing vma->vm_file with the necessary refcount dance. v2: add more users of this. Signed-off-by: Christian König --- drivers/dma-buf/dma-buf.c | 16 +--- drivers/gpu/drm/e

Re: [PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-08 Thread kernel test robot
Hi "Christian, I love your patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on staging/staging-testing linux/master linus/master v5.9-rc8 next-20201008] [cannot apply to mmotm/master] [If your patch is applied to the wrong git tree, kind

Re: [PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-08 Thread kernel test robot
Hi "Christian, I love your patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on hnaz-linux-mm/master staging/staging-testing linux/master linus/master v5.9-rc8 next-20201008] [cannot apply to mmotm/master] [If your patch is applied to the

Re: [PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-08 Thread Daniel Vetter
On Thu, Oct 08, 2020 at 01:23:39PM +0200, Christian König wrote: > Add the new vma_set_file() function to allow changing > vma->vm_file with the necessary refcount dance. > > v2: add more users of this. > > Signed-off-by: Christian König > --- > drivers/dma-buf/dma-buf.c | 16 +

Re: [PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-08 Thread Christian König
Am 08.10.20 um 13:39 schrieb Matthew Wilcox: On Thu, Oct 08, 2020 at 01:23:39PM +0200, Christian König wrote: drivers/dma-buf/dma-buf.c | 16 +--- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 4 +--- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 3 +-- drivers/

[PATCH 1/4] mm: introduce vma_set_file function v2

2020-10-08 Thread Christian König
Add the new vma_set_file() function to allow changing vma->vm_file with the necessary refcount dance. v2: add more users of this. Signed-off-by: Christian König --- drivers/dma-buf/dma-buf.c | 16 +--- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 4 +--- drivers/gp