mm: mmap: fix fput in error path
Subsystems (2)
Quoted 12 lines · Jason Gunthorpe
Quoted 11 lines · Andrew Morton
Quoted 8 lines · On Fri, 9 Oct 2020 17:03:37 +0200 "Christian König"…
Patch "
495c10cc1c0cCHROMIUM: dma-buf: restore args..." adds a workaround for a bug inmmap_region.As the comment states ->mmap() callback can change
vma->vm_fileand so we might callfput()on the wrong file.Revert the workaround and proper fix this in
mmap_region.
Quoted 6 lines
Quoted 2 lines
Doesn't this patch series address the same thing as
https://lkml.kernel.org/r/[email protected]?Same basic issue, looks like both of these patches should be combined to plug it fully.
Jason
I think so too. Both of these patches fix the fput at possible wrong @file due to ->mmap() callback can change vma->vm_file.