linux-stable/fs/overlayfs
Christian König 2896900e22 ovl: fix reference counting in ovl_mmap error path
mmap_region() now calls fput() on the vma->vm_file.

Fix this by using vma_set_file() so it doesn't need to be handled
manually here any more.

Link: https://lkml.kernel.org/r/20210421132012.82354-2-christian.koenig@amd.com
Fixes: 1527f926fd ("mm: mmap: fix fput in error path v2")
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: <stable@vger.kernel.org>	[5.11+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-04-23 14:42:39 -07:00
..
copy_up.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
dir.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
export.c ovl: propagate ovl_fs to ovl_decode_real_fh and ovl_encode_real_fh 2020-11-12 11:31:55 +01:00
file.c ovl: fix reference counting in ovl_mmap error path 2021-04-23 14:42:39 -07:00
inode.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
Kconfig docs: fix broken references to text files 2020-04-20 15:35:59 -06:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
namei.c ovl: check privs before decoding file handle 2020-12-14 15:26:14 +01:00
overlayfs.h idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
ovl_entry.h ovl: implement volatile-specific fsync error behaviour 2021-01-28 10:22:48 +01:00
readdir.c ovl: implement volatile-specific fsync error behaviour 2021-01-28 10:22:48 +01:00
super.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
util.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00