kernel_optimize_test/fs/nfs
Chuck Lever 0625c2dd6a NFS: Fix possible endless state recovery wait
In nfs4_wait_clnt_recover(), hold a reference to the clp being
waited on.  The state manager can reduce clp->cl_count to 1, in
which case the nfs_put_client() in nfs4_run_state_manager() can
free *clp before wait_on_bit() returns and allows
nfs4_wait_clnt_recover() to run again.

The behavior at that point is non-deterministic.  If the waited-on
bit still happens to be zero, wait_on_bit() will wake the waiter as
expected.  If the bit is set again (say, if the memory was poisoned
when freed) wait_on_bit() can leave the waiter asleep.

This is a narrow fix which ensures the safety of accessing *clp in
nfs4_wait_clnt_recover(), but does not address the continued use
of a possibly freed *clp after nfs4_wait_clnt_recover() returns
(see nfs_end_delegation_return(), for example).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2013-10-28 15:31:55 -04:00
..
blocklayout
objlayout
cache_lib.c
cache_lib.h
callback_proc.c
callback_xdr.c
callback.c
callback.h
client.c NFS: Add nfs4_update_server 2013-10-28 15:22:29 -04:00
delegation.c
delegation.h
dir.c
direct.c
dns_resolve.c
dns_resolve.h
file.c
fscache-index.c
fscache.c
fscache.h
getroot.c
idmap.c
inode.c NFS: Export _nfs_display_fhandle() 2013-10-28 15:23:35 -04:00
internal.h NFS: Add nfs4_update_server 2013-10-28 15:22:29 -04:00
iostat.h
Kconfig NFS: Set EXCHGID4_FLAG_SUPP_MOVED_MIGR 2013-10-28 15:31:25 -04:00
Makefile
mount_clnt.c
namespace.c
netns.h
nfs2super.c
nfs2xdr.c
nfs3acl.c
nfs3client.c
nfs3proc.c
nfs3super.c
nfs3xdr.c
nfs4_fs.h NFS: Support NFS4ERR_LEASE_MOVED recovery in state manager 2013-10-28 15:30:21 -04:00
nfs4client.c NFS: Add basic migration support to state manager thread 2013-10-28 15:24:40 -04:00
nfs4file.c
nfs4filelayout.c
nfs4filelayout.h
nfs4filelayoutdev.c
nfs4getroot.c
nfs4namespace.c NFS: Add functions to swap transports during migration recovery 2013-10-28 15:23:07 -04:00
nfs4proc.c NFS: Set EXCHGID4_FLAG_SUPP_MOVED_MIGR 2013-10-28 15:31:25 -04:00
nfs4renewd.c
nfs4session.c
nfs4session.h
nfs4state.c NFS: Fix possible endless state recovery wait 2013-10-28 15:31:55 -04:00
nfs4super.c
nfs4sysctl.c
nfs4trace.c
nfs4trace.h
nfs4xdr.c NFS: Add method to detect whether an FSID is still on the server 2013-10-28 15:30:03 -04:00
nfs.h
nfsroot.c
nfstrace.c
nfstrace.h
pagelist.c
pnfs_dev.c
pnfs.c
pnfs.h
proc.c
read.c
super.c NFS: Add a super_block backpointer to the nfs_server struct 2013-10-28 15:24:26 -04:00
symlink.c
sysctl.c
unlink.c
write.c