mirror-linux/fs/afs
David Howells 1744a22ae9 afs: Fix mmap
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>
2021-12-16 09:10:13 -08: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: Use folios in directory handling 2021-11-10 21:17:09 +00:00
dir_edit.c afs: Use folios in directory handling 2021-11-10 21:17:09 +00: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-16 09:10:13 -08:00
flock.c fs: remove mandatory file locking support 2021-08-23 06:15:36 -04:00
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: Sort out symlink reading 2021-11-02 09:40:18 +00:00
internal.h netfs, 9p, afs, ceph: Use folios 2021-11-10 21:16:56 +00: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-16 09:10:13 -08:00
vl_alias.c
vl_list.c
vl_probe.c
vl_rotate.c
vlclient.c
volume.c
write.c netfs, 9p, afs, ceph: Use folios 2021-11-10 21:16:56 +00:00
xattr.c
xdr_fs.h
yfsclient.c afs: Set mtime from the client for yfs create operations 2021-11-02 09:42:26 +00:00