linux-stable/fs/nfs
Anna Schumaker cbc4dacaa5 NFS: Fix READ_PLUS when server doesn't support OP_READ_PLUS
commit f06d1b10cb upstream.

Olga showed me a case where the client was sending multiple READ_PLUS
calls to the server in parallel, and the server replied
NFS4ERR_OPNOTSUPP to each. The client would fall back to READ for the
first reply, but fail to retry the other calls.

I fix this by removing the test for NFS_CAP_READ_PLUS in
nfs4_read_plus_not_supported(). This allows us to reschedule any
READ_PLUS call that has a NFS4ERR_OPNOTSUPP return value, even after the
capability has been cleared.

Reported-by: Olga Kornievskaia <kolga@netapp.com>
Fixes: c567552612 ("NFS: Add READ_PLUS data segment support")
Cc: stable@vger.kernel.org # v5.10+
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:47:47 +02:00
..
blocklayout pNFS: Fix the pnfs block driver's calculation of layoutget size 2024-01-25 15:35:18 -08:00
filelayout pNFS/filelayout: fixup pNfs allocation modes 2024-06-12 11:12:49 +02:00
flexfilelayout nfs: fix panic when nfs4_ff_layout_prepare_ds() fails 2024-03-26 18:20:04 -04:00
Kconfig NFS: Enable the READ_PLUS operation by default 2023-08-23 15:58:47 -04:00
Makefile
cache_lib.c
cache_lib.h
callback.c SUNRPC: Add enum svc_auth_status 2023-08-29 17:45:22 -04:00
callback.h
callback_proc.c nfs: convert to ctime accessor functions 2023-07-24 10:30:01 +02:00
callback_xdr.c SUNRPC: Use per-CPU counters to tally server RPC counts 2023-02-20 09:20:32 -05:00
client.c nfs: make the rpc_stat per net namespace 2024-05-17 12:01:57 +02:00
delegation.c
delegation.h
dir.c NFS: Use parent's objective cred in nfs_access_login_time() 2024-01-25 15:35:18 -08:00
direct.c nfs: fix UAF in direct writes 2024-04-03 15:28:29 +02:00
dns_resolve.c NFS: Move common includes outside ifdef 2023-08-24 13:24:15 -04:00
dns_resolve.h
export.c nfsd: allow reaping files still under writeback 2023-04-26 09:04:59 -04:00
file.c filemap: Fix errors in file.c 2023-08-24 13:24:15 -04:00
fs_context.c nfs: keep server info for remounts 2024-06-12 11:12:47 +02:00
fscache.c NFS: Fix nfs_netfs_issue_read() xarray locking for writeback interrupt 2024-03-26 18:20:03 -04:00
fscache.h nfs: convert to ctime accessor functions 2023-07-24 10:30:01 +02:00
getroot.c
inode.c nfs: Handle error of rpc_proc_register() in nfs_net_init(). 2024-05-17 12:01:58 +02:00
internal.h nfs: fix undefined behavior in nfs_block_bits() 2024-06-16 13:47:47 +02:00
io.c
iostat.h NFS: Remove all NFSIOS_FSCACHE counters due to conversion to netfs API 2023-04-11 13:08:26 -04:00
mount_clnt.c
namespace.c fs: pass the request_mask to generic_fillattr 2023-08-09 08:56:36 +02:00
netns.h nfs: make the rpc_stat per net namespace 2024-05-17 12:01:57 +02:00
nfs.h
nfs2super.c
nfs2xdr.c NFS: Guard against READDIR loop when entry names exceed MAXNAMELEN 2023-08-30 11:08:27 -04:00
nfs3_fs.h fs: drop unused posix acl handlers 2023-03-06 09:57:12 +01:00
nfs3acl.c Mainly singleton patches all over the place. Series of note are: 2023-04-27 19:57:00 -07:00
nfs3client.c NFS/pNFS: Set the connect timeout for the pNFS flexfiles driver 2023-08-24 13:24:15 -04:00
nfs3proc.c
nfs3super.c fs: drop unused posix acl handlers 2023-03-06 09:57:12 +01:00
nfs3xdr.c NFS: Guard against READDIR loop when entry names exceed MAXNAMELEN 2023-08-30 11:08:27 -04:00
nfs4_fs.h fs: Pass argument to fcntl_setlease as int 2023-07-10 14:36:11 +02:00
nfs4client.c NFSv4.1: fix pnfs MDS=DS session trunking 2023-09-13 11:51:11 -04:00
nfs4file.c fs: Pass argument to fcntl_setlease as int 2023-07-10 14:36:11 +02:00
nfs4getroot.c
nfs4idmap.c
nfs4idmap.h
nfs4namespace.c
nfs4proc.c NFS: Fix READ_PLUS when server doesn't support OP_READ_PLUS 2024-06-16 13:47:47 +02:00
nfs4renewd.c
nfs4session.c
nfs4session.h
nfs4state.c NFSv4: Fixup smatch warning for ambiguous return 2024-06-12 11:12:47 +02:00
nfs4super.c
nfs4sysctl.c nfs: simplify two-level sysctl registration for nfs4_cb_sysctls 2023-04-13 11:49:35 -07:00
nfs4trace.c
nfs4trace.h
nfs4xdr.c
nfs42.h NFSv4.2: fix listxattr maximum XDR buffer size 2024-03-26 18:20:02 -04:00
nfs42proc.c nfs42: client needs to strip file mode's suid/sgid bit after ALLOCATE op 2023-10-11 09:37:48 -04:00
nfs42xattr.c NFSv4.2: fix wrong shrinker_id 2023-06-19 15:10:45 -04:00
nfs42xdr.c NFSv4.2: Rework scratch handling for READ_PLUS (again) 2023-08-23 15:58:47 -04:00
nfsroot.c NFS: Fix an off by one in root_nfs_cat() 2024-03-26 18:20:03 -04:00
nfstrace.c
nfstrace.h NFS: Remove fscache specific trace points and NFS_INO_FSCACHE bit 2023-04-11 13:08:27 -04:00
pagelist.c NFS: Convert buffered read paths to use netfs when fscache is enabled 2023-04-11 13:08:26 -04:00
pnfs.c pNFS: Fix the pnfs block driver's calculation of layoutget size 2024-01-25 15:35:18 -08:00
pnfs.h
pnfs_dev.c NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info 2023-08-24 13:24:15 -04:00
pnfs_nfs.c NFSv4.1/pnfs: fix NFS with TLS in pnfs 2024-03-26 18:20:03 -04:00
proc.c
read.c NFS: Read unlock folio on nfs_page_create_from_folio() error 2024-04-03 15:28:29 +02:00
super.c NFS: switch back to using kill_anon_super 2023-08-31 12:47:16 +02:00
symlink.c
sysctl.c nfs: simplify two-level sysctl registration for nfs_cb_sysctls 2023-04-13 11:49:35 -07:00
sysfs.c NFS: Fix sysfs server name memory leak 2023-08-19 10:26:29 -04:00
sysfs.h NFS: Add sysfs links to sunrpc clients for nfs_clients 2023-06-19 15:04:13 -04:00
unlink.c
write.c nfs: fix UAF in direct writes 2024-04-03 15:28:29 +02:00