summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-01-21 22:37:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-06 09:36:05 +0300
commit0c217359ae6264d1747ded9d55dc0929f0e9b890 (patch)
treeae5b0755976196abed83e6372caccefdb81becd4 /fs/nfs
parent19387f4d87f68cb8e8c7388a27c43b5e1b7a3b59 (diff)
downloadlinux-0c217359ae6264d1747ded9d55dc0929f0e9b890.tar.xz
NFSv4.1: Fix an Oops in nfs41_walk_client_list
commit 3175e1dcec40fab1a444c010087f2068b6b04732 upstream. If we start state recovery on a client that failed to initialise correctly, then we are very likely to Oops. Reported-by: "Mkrtchyan, Tigran" <tigran.mkrtchyan@desy.de> Link: http://lkml.kernel.org/r/130621862.279655.1421851650684.JavaMail.zimbra@desy.de Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index 9588873d4c46..368a6b72290c 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -640,7 +640,7 @@ int nfs41_walk_client_list(struct nfs_client *new,
prev = pos;
status = nfs_wait_client_init_complete(pos);
- if (status == 0) {
+ if (pos->cl_cons_state == NFS_CS_SESSION_INITING) {
nfs4_schedule_lease_recovery(pos);
status = nfs4_wait_clnt_recover(pos);
}