Commit 0c217359ae6264d1747ded9d55dc0929f0e9b890

Authored by Trond Myklebust
Committed by Greg Kroah-Hartman
1 parent 19387f4d87

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -640,7 +640,7 @@
640 640 prev = pos;
641 641  
642 642 status = nfs_wait_client_init_complete(pos);
643   - if (status == 0) {
  643 + if (pos->cl_cons_state == NFS_CS_SESSION_INITING) {
644 644 nfs4_schedule_lease_recovery(pos);
645 645 status = nfs4_wait_clnt_recover(pos);
646 646 }