WSL2-Linux-Kernel/fs/afs
David Howells 5473fe0c48 afs: Fix mmap
[ Upstream commit 1744a22ae9 ]

Fix afs_add_open_map() to check that the vnode isn't already on the list
when it adds it.  It's possible that afs_drop_open_mmap() decremented
the cb_nr_mmap counter, but hadn't yet got into the locked section to
remove it.

Also vnode->cb_mmap_link should be initialised, so fix that too.

Fixes: 6e0e99d58a ("afs: Fix mmap coherency vs 3rd-party changes")
Reported-by: kafs-testing+fedora34_64checkkafs-build-300@auristor.com
Suggested-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: kafs-testing+fedora34_64checkkafs-build-300@auristor.com
cc: linux-afs@lists.infradead.org
Link: https://lore.kernel.org/r/686465.1639435380@warthog.procyon.org.uk/ # v1
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-12-22 09:32:45 +01:00
..
Kconfig
Makefile
addr_list.c
afs.h
afs_cm.h
afs_fs.h
afs_vl.h
cache.c
callback.c afs: Try to avoid taking RCU read lock when checking vnode validity 2021-09-13 09:10:39 +01:00
cell.c afs: Fix mmap coherency vs 3rd-party changes 2021-09-13 09:10:39 +01:00
cmservice.c
dir.c afs: Fix incorrect triggering of sillyrename on 3rd-party invalidation 2021-09-13 09:10:39 +01:00
dir_edit.c afs: Fix updating of i_blocks on file/dir extension 2021-09-13 09:14:21 +01:00
dir_silly.c afs: Fix kerneldoc warning shown up by W=1 2021-10-04 22:04:44 +01:00
dynroot.c
file.c afs: Fix mmap 2021-12-22 09:32:45 +01:00
flock.c
fs_operation.c
fs_probe.c afs: Fix corruption in reads at fpos 2G-4G from an OpenAFS server 2021-09-13 09:14:21 +01:00
fsclient.c afs: Fix corruption in reads at fpos 2G-4G from an OpenAFS server 2021-09-13 09:14:21 +01:00
inode.c afs: Fix updating of i_blocks on file/dir extension 2021-09-13 09:14:21 +01:00
internal.h afs: Fix updating of i_blocks on file/dir extension 2021-09-13 09:14:21 +01:00
main.c
misc.c
mntpt.c
proc.c
protocol_afs.h afs: Fix corruption in reads at fpos 2G-4G from an OpenAFS server 2021-09-13 09:14:21 +01:00
protocol_uae.h
protocol_yfs.h afs: Fix corruption in reads at fpos 2G-4G from an OpenAFS server 2021-09-13 09:14:21 +01:00
rotate.c afs: Try to avoid taking RCU read lock when checking vnode validity 2021-09-13 09:10:39 +01:00
rxrpc.c
security.c
server.c afs: Fix mmap coherency vs 3rd-party changes 2021-09-13 09:10:39 +01:00
server_list.c
super.c afs: Fix mmap 2021-12-22 09:32:45 +01:00
vl_alias.c
vl_list.c
vl_probe.c
vl_rotate.c
vlclient.c
volume.c
write.c afs: Fix afs_launder_page() to set correct start file position 2021-10-05 11:22:06 +01:00
xattr.c
xdr_fs.h
yfsclient.c