From: Trond Myklebust Date: Wed, 21 Jan 2015 19:37:44 +0000 (-0500) Subject: NFSv4.1: Fix an Oops in nfs41_walk_client_list X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6c90be66183adf9497a9e5f1e6810f3a4a9ab934;p=people%2Fiwj%2Flinux.git 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" Link: http://lkml.kernel.org/r/130621862.279655.1421851650684.JavaMail.zimbra@desy.de Signed-off-by: Trond Myklebust Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 037f9572b94c..d3f606255b99 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -633,7 +633,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); }