kernel_optimize_test/fs/nfs
Olga Kornievskaia d03727b248 NFSv4 fix CLOSE not waiting for direct IO compeletion
Figuring out the root case for the REMOVE/CLOSE race and
suggesting the solution was done by Neil Brown.

Currently what happens is that direct IO calls hold a reference
on the open context which is decremented as an asynchronous task
in the nfs_direct_complete(). Before reference is decremented,
control is returned to the application which is free to close the
file. When close is being processed, it decrements its reference
on the open_context but since directIO still holds one, it doesn't
sent a close on the wire. It returns control to the application
which is free to do other operations. For instance, it can delete a
file. Direct IO is finally releasing its reference and triggering
an asynchronous close. Which races with the REMOVE. On the server,
REMOVE can be processed before the CLOSE, failing the REMOVE with
EACCES as the file is still opened.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Suggested-by: Neil Brown <neilb@suse.com>
CC: stable@vger.kernel.org
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2020-06-26 08:43:14 -04:00
..
blocklayout mm: remove the pgprot argument to __vmalloc 2020-06-02 10:59:11 -07:00
filelayout NFS/pNFS: Clean up pNFS commit operations 2020-03-27 16:34:35 -04:00
flexfilelayout pNFS/flexfiles: Fix list corruption if the mirror count changes 2020-06-26 08:43:14 -04:00
cache_lib.c
cache_lib.h
callback_proc.c NFSv4: Add support for CB_RECALL_ANY for flexfiles layouts 2020-03-16 08:34:30 -04:00
callback_xdr.c
callback.c
callback.h NFSv4: Add support for CB_RECALL_ANY for flexfiles layouts 2020-03-16 08:34:30 -04:00
client.c nfs: add minor version to nfs_server_key for fscache 2020-02-25 13:53:24 -05:00
delegation.c NFS: Beware when dereferencing the delegation cred 2020-04-03 18:26:02 -04:00
delegation.h
dir.c NFS client updates for Linux 5.7 2020-04-07 13:51:39 -07:00
direct.c NFSv4 fix CLOSE not waiting for direct IO compeletion 2020-06-26 08:43:14 -04:00
dns_resolve.c NFS: remove duplicate headers 2020-05-27 10:10:12 -04:00
dns_resolve.h
export.c
file.c NFSv4 fix CLOSE not waiting for direct IO compeletion 2020-06-26 08:43:14 -04:00
fs_context.c NFS: Fix a few constant_table array definitions 2020-04-02 18:37:13 -04:00
fscache-index.c
fscache.c NFSv4: Fix fscache cookie aux_data to ensure change_attr is included 2020-05-08 22:20:24 +01:00
fscache.h
getroot.c NFS: Ensure security label is set for root inode 2020-03-30 19:56:50 -04:00
inode.c nfs: set invalid blocks after NFSv4 writes 2020-06-11 13:33:48 -04:00
internal.h mm/writeback: discard NR_UNSTABLE_NFS, use NR_WRITEBACK instead 2020-06-02 10:59:08 -07:00
io.c
iostat.h
Kconfig Documentation: nfsroot.rst: Fix references to nfsroot.rst 2020-03-02 13:11:46 -07:00
Makefile
mount_clnt.c NFSv3: fix rpc receive buffer size for MOUNT call 2020-05-14 18:42:44 -04:00
namespace.c NFS: Add a module parameter to set nfs_mountpoint_expiry_timeout 2020-04-02 18:53:59 -04:00
netns.h
nfs.h
nfs2super.c
nfs2xdr.c
nfs3_fs.h
nfs3acl.c nfs: Fix potential posix_acl refcnt leak in nfs3_set_acl 2020-04-20 09:58:59 -04:00
nfs3client.c
nfs3proc.c NFS: move dprintk after nfs_alloc_fattr in nfs3_proc_lookup 2020-05-27 10:08:26 -04:00
nfs3super.c
nfs3xdr.c
nfs4_fs.h NFSv4: Add support for CB_RECALL_ANY for flexfiles layouts 2020-03-16 08:34:30 -04:00
nfs4client.c nfs: add minor version to nfs_server_key for fscache 2020-02-25 13:53:24 -05:00
nfs4file.c NFSv4.2: error out when relink swapfile 2020-03-16 10:14:30 -04:00
nfs4getroot.c
nfs4idmap.c
nfs4idmap.h
nfs4namespace.c nfs: Fix memory leak of export_path 2020-06-26 08:43:14 -04:00
nfs4proc.c NFSv4.1 fix rpc_call_done assignment for BIND_CONN_TO_SESSION 2020-05-27 10:09:21 -04:00
nfs4renewd.c
nfs4session.c
nfs4session.h
nfs4state.c nfs: fix NULL deference in nfs4_get_valid_delegation 2020-05-11 14:05:58 -04:00
nfs4super.c
nfs4sysctl.c
nfs4trace.c
nfs4trace.h NFSv4: Add support for CB_RECALL_ANY for flexfiles layouts 2020-03-16 08:34:30 -04:00
nfs4xdr.c
nfs42.h
nfs42proc.c
nfs42xdr.c
nfsroot.c nfsroot: set tcp as the default transport protocol 2020-03-25 08:45:47 -04:00
nfstrace.c
nfstrace.h NFS: Add a tracepoint in nfs_set_pgio_error() 2020-06-11 13:33:48 -04:00
pagelist.c NFS: Add a tracepoint in nfs_set_pgio_error() 2020-06-11 13:33:48 -04:00
pnfs_dev.c
pnfs_nfs.c NFS/pnfs: Don't use RPC_TASK_CRED_NOREF with pnfs 2020-05-13 09:55:36 -04:00
pnfs.c NFS/pnfs: Fix a credential use-after-free issue in pnfs_roc() 2020-04-19 23:53:52 -04:00
pnfs.h pNFS/flexfiles: Check the layout segment range before doing I/O 2020-03-27 16:34:35 -04:00
proc.c
read.c NFS: Trace short NFS READs 2020-06-11 13:33:48 -04:00
super.c Merge tag 'fscache-fixes-20200508-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs 2020-05-11 14:06:50 -04:00
symlink.c
sysctl.c
sysfs.c
sysfs.h NFS: Use the correct style for SPDX License Identifier 2020-05-27 10:08:26 -04:00
unlink.c NFS: Avoid referencing the cred twice in async rename/unlink 2020-03-16 08:34:29 -04:00
write.c mm/writeback: discard NR_UNSTABLE_NFS, use NR_WRITEBACK instead 2020-06-02 10:59:08 -07:00