This is a note to let you know that I've just added the patch titled NFSv4.1: Handle errors correctly in nfs41_walk_client_list to the 3.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: nfsv4.1-handle-errors-correctly-in-nfs41_walk_client_list.patch and it can be found in the queue-3.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 64590daa9e0dfb3aad89e3ab9230683b76211d5b Mon Sep 17 00:00:00 2001 From: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> Date: Fri, 17 Jan 2014 17:03:41 -0500 Subject: NFSv4.1: Handle errors correctly in nfs41_walk_client_list From: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> commit 64590daa9e0dfb3aad89e3ab9230683b76211d5b upstream. Both nfs41_walk_client_list and nfs40_walk_client_list expect the 'status' variable to be set to the value -NFS4ERR_STALE_CLIENTID if the loop fails to find a match. The problem is that the 'pos->cl_cons_state > NFS_CS_READY' changes the value of 'status', and sets it either to the value '0' (which indicates success), or to the value EINTR. Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/nfs/nfs4client.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -491,9 +491,10 @@ int nfs40_walk_client_list(struct nfs_cl prev = pos; status = nfs_wait_client_init_complete(pos); - spin_lock(&nn->nfs_client_lock); if (status < 0) - continue; + goto out; + status = -NFS4ERR_STALE_CLIENTID; + spin_lock(&nn->nfs_client_lock); } if (pos->cl_cons_state != NFS_CS_READY) continue; @@ -631,7 +632,8 @@ int nfs41_walk_client_list(struct nfs_cl } spin_lock(&nn->nfs_client_lock); if (status < 0) - continue; + break; + status = -NFS4ERR_STALE_CLIENTID; } if (pos->cl_cons_state != NFS_CS_READY) continue; Patches currently in stable-queue which might be from trond.myklebust@xxxxxxxxxxxxxxx are queue-3.12/nfsv4-fix-a-slot-leak-in-nfs40_sequence_done.patch queue-3.12/nfs4.1-properly-handle-enotsup-in-secinfo_no_name.patch queue-3.12/pnfs-proper-delay-for-nfs4err_recallconflict-in-layout_get_done.patch queue-3.12/nfs-always-make-sure-page-is-up-to-date-before-extending-a-write-to-cover-the-entire-page.patch queue-3.12/nfsv4-open-must-handle-the-nfs4err_io-return-code-correctly.patch queue-3.12/sunrpc-fix-infinite-loop-in-rpc-state-machine.patch queue-3.12/nfs4-fix-discover_server_trunking-use-after-free.patch queue-3.12/nfsv4.1-handle-errors-correctly-in-nfs41_walk_client_list.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html