Re: [PATCH 1/6] mm: mmap: fix fput in error path

2020-10-12 Thread Christian König
Am 10.10.20 um 00:25 schrieb Jason Gunthorpe: On Fri, Oct 09, 2020 at 03:04:20PM -0700, Andrew Morton wrote: On Fri, 9 Oct 2020 17:03:37 +0200 "Christian König" wrote: Patch "495c10cc1c0c CHROMIUM: dma-buf: restore args..." adds a workaround for a bug in mmap_region. As the comment states

Re: [PATCH 1/6] mm: mmap: fix fput in error path

2020-10-09 Thread linmiaohe
Jason Gunthorpe wrote: > On Fri, Oct 09, 2020 at 03:04:20PM -0700, Andrew Morton wrote: >> On Fri, 9 Oct 2020 17:03:37 +0200 "Christian König" >> wrote: >> >> > Patch "495c10cc1c0c CHROMIUM: dma-buf: restore args..." >> > adds a workaround for a bug in mmap_region. >> > >> > As the comment

Re: [PATCH 1/6] mm: mmap: fix fput in error path

2020-10-09 Thread Jason Gunthorpe
On Fri, Oct 09, 2020 at 03:04:20PM -0700, Andrew Morton wrote: > On Fri, 9 Oct 2020 17:03:37 +0200 "Christian König" > wrote: > > > Patch "495c10cc1c0c CHROMIUM: dma-buf: restore args..." > > adds a workaround for a bug in mmap_region. > > > > As the comment states ->mmap() callback can

Re: [PATCH 1/6] mm: mmap: fix fput in error path

2020-10-09 Thread Andrew Morton
On Fri, 9 Oct 2020 17:03:37 +0200 "Christian König" wrote: > Patch "495c10cc1c0c CHROMIUM: dma-buf: restore args..." > adds a workaround for a bug in mmap_region. > > As the comment states ->mmap() callback can change > vma->vm_file and so we might call fput() on the wrong file. > > Revert

Re: [PATCH 1/6] mm: mmap: fix fput in error path

2020-10-09 Thread Jason Gunthorpe
On Fri, Oct 09, 2020 at 05:03:37PM +0200, Christian König wrote: > Patch "495c10cc1c0c CHROMIUM: dma-buf: restore args..." > adds a workaround for a bug in mmap_region. > > As the comment states ->mmap() callback can change > vma->vm_file and so we might call fput() on the wrong file. > > Revert

[PATCH 1/6] mm: mmap: fix fput in error path

2020-10-09 Thread Christian König
Patch "495c10cc1c0c CHROMIUM: dma-buf: restore args..." adds a workaround for a bug in mmap_region. As the comment states ->mmap() callback can change vma->vm_file and so we might call fput() on the wrong file. Revert the workaround and proper fix this in mmap_region. Signed-off-by: Christian