linux-brain/fs/nfs
Trond Myklebust af412413c1 NFSv4.1 fix infinite loop on I/O.
commit 994b15b983 upstream.

The previous fix broke recovery of delegated stateids because it assumes
that if we did not mark the delegation as suspect, then the delegation has
effectively been revoked, and so it removes that delegation irrespectively
of whether or not it is valid and still in use. While this is "mostly
harmless" for ordinary I/O, we've seen pNFS fail with LAYOUTGET spinning
in an infinite loop while complaining that we're using an invalid stateid
(in this case the all-zero stateid).

What we rather want to do here is ensure that the delegation is always
correctly marked as needing testing when that is the case. So we want
to close the loophole offered by nfs4_schedule_stateid_recovery(),
which marks the state as needing to be reclaimed, but not the
delegation that may be backing it.

Fixes: 0e3d3e5df0 ("NFSv4.1 fix infinite loop on IO BAD_STATEID error")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: stable@vger.kernel.org # v4.11+
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-26 08:36:37 +02:00
..
blocklayout pnfs/blocklayout: off by one in bl_map_stripe() 2018-09-09 20:01:23 +02:00
filelayout NFSv4.1: nfs4_fl_prepare_ds must be careful about reporting success. 2017-01-19 20:18:05 +01:00
flexfilelayout pNFS/flexfiles: missing error code in ff_layout_alloc_lseg() 2018-04-13 19:48:05 +02:00
objlayout mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
cache_lib.c NFS: cache_lib: use complete() instead of complete_all() 2016-09-23 09:40:12 -04:00
cache_lib.h NFS: simplify and clean cache library 2013-02-15 10:43:36 -05:00
callback_proc.c NFSv4.1: Fix a potential layoutget/layoutrecall deadlock 2018-09-19 22:47:16 +02:00
callback_xdr.c NFSv4.0 fix client reference leak in callback 2018-09-19 22:47:13 +02:00
callback.c nfs: make nfs4_cb_sv_ops static 2017-10-08 10:26:10 +02:00
callback.h nfs: add handling for CB_NOTIFY_LOCK in client 2016-09-22 13:56:04 -04:00
client.c NFS: Ignore connections that have cl_rpcclient uninitialized 2016-11-07 16:11:29 -05:00
delegation.c NFS: Always call nfs_inode_find_state_and_recover() when revoking a delegation 2016-09-27 14:35:04 -04:00
delegation.h NFSv4: nfs_inode_find_state_and_recover() should check all stateids 2016-09-27 14:34:35 -04:00
dir.c NFS: Fix a typo in nfs_rename() 2017-12-14 09:28:23 +01:00
direct.c NFS: Fix an incorrect type in struct nfs_direct_req 2018-03-18 11:18:54 +01:00
dns_resolve.c NFS: Enabling v4.2 should not recompile nfsd and lockd 2013-11-19 16:20:40 -05:00
dns_resolve.h
file.c NFS: Sync the correct byte range during synchronous writes 2017-09-13 14:13:37 -07:00
fscache-index.c NFS: Fabricate fscache server index key correctly 2014-09-25 21:25:18 -04:00
fscache.c nfs: define nfs_inc_fscache_stats and using it as possible 2014-11-24 20:08:47 -05:00
fscache.h NFS: Use i_writecount to control whether to get an fscache cookie in nfs_open() 2013-09-27 18:40:25 +01:00
getroot.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
inode.c NFS: only invalidate dentrys that are clearly invalid. 2017-07-27 15:08:06 -07:00
internal.h NFS: Fix 2 use after free issues in the I/O code 2017-09-13 14:13:37 -07:00
io.c NFS: Fix a race between mmap() and O_DIRECT 2018-02-17 13:21:14 +01:00
iostat.h nfs: define nfs_inc_fscache_stats and using it as possible 2014-11-24 20:08:47 -05:00
Kconfig pnfs/blocklayout: require 64-bit sector_t 2017-08-16 13:43:22 -07:00
Makefile NFS: Do not serialise O_DIRECT reads and writes 2016-07-05 19:11:04 -04:00
mount_clnt.c NFS: Remove unneeded NFS_DEBUG checking before define NFSDBG_FACILITY 2015-10-21 15:49:23 -05:00
namespace.c fs: Better permission checking for submounts 2017-03-15 10:02:44 +08:00
netns.h fs: nfs: Make nfs boot time y2038 safe 2016-10-04 16:20:26 -04:00
nfs.h NFS: Convert v4 into a module 2012-07-30 19:06:52 -04:00
nfs2super.c NFS: Convert v2 into a module 2012-07-30 19:06:41 -04:00
nfs2xdr.c nfs: save server READ/WRITE/COMMIT status 2015-02-03 11:06:40 -08:00
nfs3_fs.h nfsv3: introduce nfs3_set_ds_client 2015-02-03 11:06:34 -08:00
nfs3acl.c posix_acl: Inode acl caching fixes 2016-03-31 00:30:15 -04:00
nfs3client.c nfs4: flexfiles: respect noresvport when establishing connections to DSes 2016-07-19 16:23:25 -04:00
nfs3proc.c vfs: Remove {get,set,remove}xattr inode operations 2016-10-07 21:48:36 -04:00
nfs3super.c nfsv3: introduce nfs3_set_ds_client 2015-02-03 11:06:34 -08:00
nfs3xdr.c xprtrdma: Fix large NFS SYMLINK calls 2015-08-05 16:21:28 -04:00
nfs4_fs.h NFSv4: Fix CLOSE races with OPEN 2016-11-18 13:35:58 -05:00
nfs4client.c NFSv4.1 respect server's max size in CREATE_SESSION 2017-12-20 10:07:26 +01:00
nfs4file.c switch generic_file_splice_read() to use of ->read_iter() 2016-10-05 18:23:56 -04:00
nfs4getroot.c nfs: Remove invalid NFS_ATTR_FATTR_V4_REFERRAL checking in nfs4_get_rootfh 2015-07-01 11:31:22 -04:00
nfs4idmap.c NFSv4: Fix possible 1-byte stack overflow in nfs_idmap_read_and_verify_message 2018-07-03 11:23:16 +02:00
nfs4idmap.h NFS: Move nfs_idmap.h into fs/nfs/ 2015-04-23 15:16:14 -04:00
nfs4namespace.c fs: Better permission checking for submounts 2017-03-15 10:02:44 +08:00
nfs4proc.c NFSv4.1 fix infinite loop on I/O. 2018-09-26 08:36:37 +02:00
nfs4renewd.c NFSv4: Cap the transport reconnection timer at 1/2 lease period 2016-08-05 19:22:22 -04:00
nfs4session.c fs/nfs: Fix used uninitialized warn in nfs4_slot_seqid_in_use() 2016-11-07 16:11:30 -05:00
nfs4session.h NFSv4.1: Don't deadlock the state manager on the SEQUENCE status flags 2016-09-27 14:31:27 -04:00
nfs4state.c NFSv4.1 fix infinite loop on I/O. 2018-09-26 08:36:37 +02:00
nfs4super.c NFS: Move nfs_idmap.h into fs/nfs/ 2015-04-23 15:16:14 -04:00
nfs4sysctl.c nfs: Do not convert nfs_idmap_cache_timeout to jiffies 2018-05-30 07:50:20 +02:00
nfs4trace.c pNFS: Modify pnfs_update_layout tracepoints to use layout stateid 2015-12-28 09:57:14 -05:00
nfs4trace.h NFS: Avoid RCU usage in tracepoints 2017-11-30 08:39:04 +00:00
nfs4xdr.c NFSv4: Fix EXCHANGE_ID corrupt verifier issue 2017-08-11 08:49:28 -07:00
nfs42.h NFS: Add COPY nfs operation 2016-05-17 15:47:55 -04:00
nfs42proc.c NFSv4: Fix reboot recovery in copy offload 2017-03-12 06:41:51 +01:00
nfs42xdr.c NFSv4.2: Fix warning "variable ‘stateids’ set but not used" 2016-07-24 17:36:06 -04:00
nfsroot.c nfsroot: make nfsroot to accept the 1024 bytes long directory name 2015-10-21 15:49:19 -05:00
nfstrace.c NFSv4: Allow tracing of NFSv4 fsync calls 2015-03-27 12:39:34 -04:00
nfstrace.h NFS client updates for Linux 4.8 2016-07-30 16:33:25 -07:00
pagelist.c NFS: Fix missing pg_cleanup after nfs_pageio_cond_complete() 2018-03-24 11:00:12 +01:00
pnfs_dev.c NFSv4.1: Don't cache deviceids that have no notifications 2015-03-27 12:32:24 -04:00
pnfs_nfs.c NFS pnfs data server multipath session trunking 2016-09-19 13:08:37 -04:00
pnfs.c pNFS: Fix a deadlock when coalescing writes and returning the layout 2018-03-24 11:00:21 +01:00
pnfs.h pNFS: On error, do not send LAYOUTGET until the LAYOUTRETURN has completed 2017-01-09 08:32:24 +01:00
proc.c fs: rename "rename2" i_op to "rename" 2016-09-27 11:03:58 +02:00
read.c mm: remove page_file_index 2016-10-07 18:46:28 -07:00
super.c fs: Teach path_connected to handle nfs filesystems with multiple roots. 2018-03-22 09:18:00 +01:00
symlink.c switch ->get_link() to delayed_call, kill ->put_link() 2015-12-30 13:01:03 -05:00
sysctl.c nfs: convert use of typedef ctl_table to struct ctl_table 2014-06-06 16:08:16 -07:00
unlink.c qstr: constify instances in nfs 2016-07-20 23:30:06 -04:00
write.c NFS: Fix unstable write completion 2018-03-18 11:18:54 +01:00