]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
coda: fix reference counting in coda_file_mmap error path
authorChristian König <christian.koenig@amd.com>
Fri, 23 Apr 2021 21:28:51 +0000 (14:28 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 May 2021 07:54:09 +0000 (09:54 +0200)
commita13a1d9f226d10e4af3742db49d19ed12835deaf
treef8da4a25af59e396e1f5c325023aaefaff9ef37e
parent16050591bff1b4b01ec323013ad408de6a122cd6
coda: fix reference counting in coda_file_mmap error path

BugLink: https://bugs.launchpad.net/bugs/1927535
commit 9da29c7f77cd04e5c9150e30f047521b6f20a918 upstream.

mmap_region() now calls fput() on the vma->vm_file.

So we need to drop the extra reference on the coda file instead of the
host file.

Link: https://lkml.kernel.org/r/20210421132012.82354-1-christian.koenig@amd.com
Fixes: 1527f926fd04 ("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>
Acked-by: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
fs/coda/file.c